It's all about the answers!

Ask a question

How get testcases's requirements external ID through web Services?


Rafael Rodriguez Montes (23013130258) | asked May 26 '15, 2:45 p.m.
edited May 30 '15, 12:43 a.m. by Geoffrey Clemm (30.1k33035)

 Hello,

how the URL should be if I want to do a query of all testcases's requirement(s) ID(S) ?

I'm using this example but is giving me just the test cases list(no requirements attached):

https://jazzzzzserver/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/_-projectareaid/testcase?fields=feed/entry/content/testcase/(title|description)/requirement/(id)

Thank you.

3 answers



permanent link
Donald Nong (14.5k614) | answered May 26 '15, 8:44 p.m.
The details of the requirements are not contained in the RQM database so I don't think you can retrieve such details (including the IDs) using RQM reportable REST API, you have to get the requirement links (be it from ReqPro, DOORS or RDNG) and retrieve them one by one using the appropriate REST API.

Also, the field selection in your sample is incorrect even if the ID of the requirement could have been returned. It should look like this:
?fields=feed/entry/content/testcase/(title|description|requirement/id)


Comments
Rafael Rodriguez Montes commented May 26 '15, 8:54 p.m.

But how I'm able to get it thro RPE, so the data is available, just I need to know the right url query


Thank you Donald 
And yes the system was giving results 


permanent link
Rafael Rodriguez Montes (23013130258) | answered May 27 '15, 12:34 p.m.

never mind, I found the way, this should be at the end like testcase/requirement/.... requirement attributes.

thanks !!


permanent link
Vaibhav S (106354) | answered Jan 02 '18, 3:53 a.m.

Hi,

Get the resource url using  :

ClientResponse tempResponseVar2 = clientTestCase.getResource(resultsUrl[i], OSLCConstants.CT_RDF);

Then do the document parsing to extract the Test Case IDs :
 InputStream inputStream =  response.getEntity(InputStream.class);
             
             testCase= tempResponseVar2.getEntity(TestCase.class);
         
             InputSource inputSource = new InputSource(inputStream);
                      
             DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
             DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
             
             Document document = dBuilder.parse(inputSource);
             
             NodeList element = document.getElementsByTagName("rqm_qm:shortIdentifier");

This should work.

Thanks
Vaibhav

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.