1

I am trying to access test set data in QC/ALM via C# and the REST API, but I am struggling to with path navigation.

In Test Lab we have a path of:

Root
  UnitTests
    QA-US
    QA-UK
      Product1
        ...
      Product2
        Test Campaign 1
        Test Campaign 2
          RC 1
          RC 2

I am trying to access test run details for a campaign (e.g. Test Campaign 1, RC 2) but I can't figure out how I do this.

I looked at this Stack Overflow question but I couldn't figure out the hierarchy path.

I attempted to use: http://IP:PORT/qcbin/rest/domains/THEDOMAIN/projects/THEPROJECT/test-set-folders?query={name['Root']} and get details back, but if I want a want a deeper path .. e.g. 'Root\UnitTests\QA-UK\Product2\Test Campaign 1\RC 1' it fails to be found.

Any assistance would be greatly appreciated.

Swatcat
  • 73
  • 6
  • 21
  • 57

1 Answers1

2

You can get folder level sets using following way. Filter on name will not work. You need to filter on parent-id. Even though it is id field still HP accepts folder name. Following query works on my HPALM instance and hopefully it will work with yours as well.

http://host:port/qcbin/rest/domains/DEFAULT/projects/TestP/test-sets?query={parent-id[^Root\Path 1\Path 2^]}. 

Regards

Gaurav

Gaurav
  • 811
  • 9
  • 21
  • Hi, thank you I am getting closer now (which is a big improvement) ... Does Query need another argument if I want a specific test set within a folder - e.g. for Nov 2018 we have 5 RC test sets within the folder and I want to access RC4. – Swatcat Dec 06 '18 at 09:42
  • @GemmaMorriss can you please mark this answer as accepted – Ausaf Feb 10 '22 at 17:09