OSCL call to retrieve all test steps from a project
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:
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:
Thanks.
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
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
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