SOAP API - Get root test case (folder)

Thursday, November 27, 2014
Avatar

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
Monday, December 1, 2014
Avatar
inflectra.sarahx
re: Loenhoet Thursday, November 27, 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
Monday, December 1, 2014
Avatar
re: inflectra.sarahx 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.
Monday, December 1, 2014
Avatar
re: inflectra.sarahx 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.

Spira Helps You Deliver Quality Software, Faster and With Lower Risk

And if you have any questions, please email or call us at +1 (202) 558-6885

 

Statistics
  • Started: Thursday, November 27, 2014
  • Last Reply: Monday, December 1, 2014
  • Replies: 3
  • Views: 2664