Thread

Skip Navigation LinksForums > SpiraTeam Forums > SpiraTeam Issues & Questi... > SOAP API - Get root test ...

SOAP API - Get root test case (folder) RSS Feed

Thursday, November 27, 2014

Hi,

I would like to get a list of the 'root folders' trough the SOAP API. I can either use:

  • TestCase_RetrieveByFolder(int testCaseFolderId). But how do I get the root folder? From there, I can browse the rest of the tree.
  • TestCase_Retrieve(ArrayOfRemoteFilter? remoteFilters, int startingRow, int numberOfRows) with using a filter on the IndentLevel parameter. However, this seems not to be working as expected.

In the last code, I used (for testing):

var Filter = new RemoteFilter();
Filter.PropertyName = "IndentLevel";
Filter.StringValue = "AAA";

var RootTestCases = Client.TestCase_Retrieve(remoteFilters: new RemoteFilter[] { Filter }, startingRow: 1, numberOfRows: 50);

However, it still gives me all results ignoring the filter. What am I doing wrong?

3 Replies
Sarah T.Sarah T.
re: Stefan van Loenhout on Thursday, November 27, 2014
Monday, December 1, 2014
Hi Stefan

I have just checked and there is not a way to get the root test cases at present I'm afraid with a single call.
You'd need to basically call the main TestCase_Retrieve(...) function to get a list of test cases in the project and then loop through and only use the ones that have an IndentLevel of three characters in length (e.g. AAA, AAB, AAC, etc.)

Regards

Sarah
Stefan van LoenhoutStefan van Loenhout
re: Sarah T. on Monday, December 1, 2014
Monday, December 1, 2014
Hi Sarah,

thank you for the answer. The reason why I was looking for this is because we have a quite slow connection between our offices. So, I thought, if I can find the root elements first, I can browse the whole tree from there ...

But for now I can just download all the test cases first before we can continue, it is also acceptable for now.
Stefan van LoenhoutStefan van Loenhout
re: Sarah T. on Monday, December 1, 2014
Monday, December 1, 2014
Hi Sarah,

thank you for the answer. The reason why I was looking for this is because we have a quite slow connection between our offices. So, I thought, if I can find the root elements first, I can browse the whole tree from there ...

But for now I can just download all the test cases first before we can continue, it is also acceptable for now.
Tagged
Statistics
  • Started: 11/27/2014
  • Last Reply: 12/1/2014
  • Replies: 3
  • Views: 370
Powered by KronoDesk v1.1.0.15 | © Copyright Inflectra Corporation 2011-2016 | Licensed to Inflectra Corporation.