Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

 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.

0 votes



3 answers

Permanent link
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)

0 votes

Comments

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

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

thanks !!

0 votes


Permanent link

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

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 11,035

Question asked: May 26 '15, 2:45 p.m.

Question was seen: 4,134 times

Last updated: Jan 02 '18, 3:53 a.m.

Confirmation Cancel Confirm