It's all about the answers!

Ask a question

OSCL call to retrieve all test steps from a project


Antonio Dionisio (1715) | asked Nov 24 '16, 3:25 a.m.
edited Nov 24 '16, 3:27 a.m.
I am using Jazz Team Server 5.0.1. I need to read and save in a file all test steps from a project (and for several projects). One way to do this via OSCL call is doing something like this:

            int i = 1;
            while (keep){
             try{
                ResponseHandler<String> responseHandler=new BasicResponseHandler();
                HttpUriRequest req = new HttpGet("https://localhost:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Proyecto%20Calidad/testscript/urn:com.ibm.rqm:testscript:" + i);
                i++;
                String res = oslcClient.getHttpClient().execute(req, responseHandler);
                //Save the res in a file...
              } catch (exception e){
                  keep = false;
             }
            }

This is somewhat a hassle and I think it may be problematic if for some reason there is a gap in the id (eg the script with id 2 is deleted). There is any way to retrieve all the test scripts with their test steps?


Please note that I need the test script steps so using this url in the call is not enough since it does not provide the test steps:

https://localhost:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Proyecto%20Calidad/testscript/

Thanks.

Accepted answer


permanent link
Donald Nong (14.5k614) | answered Nov 25 '16, 1:09 a.m.
Easy. Try this.
https://localhost:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Proyecto%20Calidad/testscript?fields=feed/entry/content/testscript/(identifier|webId|title|steps/*/*)

For more details, see this document.
https://jazz.net/wiki/bin/view/Main/RqmApi#fields
Antonio Dionisio selected this answer as the correct answer

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.