I have retrieved the test plans, testcase out using rpe 1.2 from rqm 4.0, How do I retrieve the testscripts steps for each testcase?
One answer
I believe you are using RQM reportable RESTful API to retrieve all the artifacts. You cannot get testscripts steps directly within a test case. You must obtain the test scripts within a test case, then obtain test script steps within each script.
To find the url for test scripts within test case, find an element named "testscript" like below within the obtained test case xml:
<ns2:testscript href="https://davidbox-win7:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Quality+Manager/testscript/urn:com.ibm.rqm:testscript:1"/>
Then use the url in href attibute with a param to do another GET of the test script:
https://davidbox-win7:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Quality+Manager/testscript/urn:com.ibm.rqm:testscript:1?etlmode=true
or
https://davidbox-win7:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Quality+Manager/testscript/urn:com.ibm.rqm:testscript:1?abbreviate=false
You will find entried in returned xml like:
<ns2:steps><ns9:step ns1:id="_KmLf0bbNEeKZePXMCv2ntw" type="execution" stepIndex="1"><ns9:name>1</ns9:name><ns9:title>1</ns9:title><ns9:description><div:div xmlns:div="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml">1</div:div></ns9:description><ns9:expectedResult><div:div xmlns:div="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml">1</div:div></ns9:expectedResult><ns9:comment/><ns9:compare/></ns9:step></ns2:steps>
Wish this helps.
To find the url for test scripts within test case, find an element named "testscript" like below within the obtained test case xml:
<ns2:testscript href="https://davidbox-win7:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Quality+Manager/testscript/urn:com.ibm.rqm:testscript:1"/>
Then use the url in href attibute with a param to do another GET of the test script:
https://davidbox-win7:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Quality+Manager/testscript/urn:com.ibm.rqm:testscript:1?etlmode=true
or
https://davidbox-win7:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Quality+Manager/testscript/urn:com.ibm.rqm:testscript:1?abbreviate=false
You will find entried in returned xml like:
<ns2:steps><ns9:step ns1:id="_KmLf0bbNEeKZePXMCv2ntw" type="execution" stepIndex="1"><ns9:name>1</ns9:name><ns9:title>1</ns9:title><ns9:description><div:div xmlns:div="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml">1</div:div></ns9:description><ns9:expectedResult><div:div xmlns:div="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml">1</div:div></ns9:expectedResult><ns9:comment/><ns9:compare/></ns9:step></ns2:steps>
Wish this helps.
Comments
When I try this in my RQM environment, the URL's are just opening the normal RQM user interface in my browser. It's not returning the XML formatted list of steps. The URL I'm using is:
https://clm.jkebanking.net/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/JKE+Banking+4.0.1+%28QM%29/testscript/urn:com.ibm.rqm:testscript:44?abbreviate=false
I also tried:
https://clm.jkebanking.net/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/JKE+Banking+4.0.1+%28QM%29/testscript/urn:com.ibm.rqm:testscript:44?etlmode=true
Keaton,
Be user to specify the Request Header text/xml or Application/xml when performing the requests. This will ensure you obtain the XML of the artifact
You can use Poster or any other type of http client to make the request
Ara