I need to fetch a few fields off a test plan test scripts
Hi There,
I am using RQM for my project. I am trying to understand the procedure to implement the following.
When i click a release --> goto test plan --> click on test case the UI contains the list of test cases followed by many columns.
I want to pull these columns from my java code, or CLI.
I am presently using the RQMUrlUtility.jar, but it only returns me data equivalent to ctrl + u.
Please let me know how i can proceed on this.
Many thanks.
Accepted answer
Hi Jigar,
You will have to GET the test case resource and you can retrieve the requirement link using calmlinks=true like this:
The XML from that test case, ID 62, includes ID, priority, state, owner, created by, validates requirement
Without clmlinks=true you will not get the requirement data, e.g. this snippet from a GET on my URL example above:
<ns2:template href="https://clmlocal.ibm.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/BuildIntegration+%28Quality+Management%29/template/testcase/com.ibm.rqm.planning.templates.testcase.default"/><ns2:requirement summary="myReqTest" rel="validates" href="https://clmlocal.ibm.com:9443/rm/resources/_y4clM5L2EeWHbOjihWwStw"/></ns2:testcase>
Thanks,
Brett
You will have to GET the test case resource and you can retrieve the requirement link using calmlinks=true like this:
https://clmlocal.ibm.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/BuildIntegration+%28Quality+Management%29/testcase/urn:com.ibm.rqm:testcase:62?calmlinks=true
The XML from that test case, ID 62, includes ID, priority, state, owner, created by, validates requirement
Without clmlinks=true you will not get the requirement data, e.g. this snippet from a GET on my URL example above:
<ns2:template href="https://clmlocal.ibm.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/BuildIntegration+%28Quality+Management%29/template/testcase/com.ibm.rqm.planning.templates.testcase.default"/><ns2:requirement summary="myReqTest" rel="validates" href="https://clmlocal.ibm.com:9443/rm/resources/_y4clM5L2EeWHbOjihWwStw"/></ns2:testcase>
Thanks,
Brett
One other answer
Hi Jigar,
Have you looked at the fields parameter of the RQM REST API, e.g. something like this?
https://clmlocal.ibm.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/myProject/testcase?fields=feed/entry/content/testcase/(*|testplan[@href='https://clmlocal.ibm.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/myProject/testplan/urn:com.ibm.rqm:testplan:23')
To return XML for all test cases associated to test plan ID 23 (in the example above) in RQM project area "myProject"
You can get all the fields from a test case with:
https://clmlocal.ibm.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/myProject/testcase/urn:com.ibm.rqm:testcase:64
There are other examples here https://sleroyblog.wordpress.com/2013/04/09/querying-rqm-40-through-oslc-and-rest-api/ and here https://jazz.net/wiki/bin/view/Main/RqmApi#fields
Thanks,
Brett
Have you looked at the fields parameter of the RQM REST API, e.g. something like this?
https://clmlocal.ibm.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/myProject/testcase?fields=feed/entry/content/testcase/(*|testplan[@href='https://clmlocal.ibm.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/myProject/testplan/urn:com.ibm.rqm:testplan:23')
To return XML for all test cases associated to test plan ID 23 (in the example above) in RQM project area "myProject"
You can get all the fields from a test case with:
https://clmlocal.ibm.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/myProject/testcase/urn:com.ibm.rqm:testcase:64
There are other examples here https://sleroyblog.wordpress.com/2013/04/09/querying-rqm-40-through-oslc-and-rest-api/ and here https://jazz.net/wiki/bin/view/Main/RqmApi#fields
Thanks,
Brett
Comments
Brett Bohnn
Jan 14 '16, 1:06 p.m.Jigar Shah
Jan 14 '16, 1:11 p.m.