It's all about the answers!

Ask a question

how to use RQM REST API to get Test Case Execution Record links related to a specific Test case?


jane zhou (106865) | asked Nov 16 '17, 3:23 p.m.

 

Hi Someone who may concern,

      I tried to use RQM REST API to retrieve a specific test case and I want to parse the content to get TCER related to this test case. But I found there is no such info in test case:

https://[local host]/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/[project name]/testcase/[Test case number]

     I tried to add "?calmlinks=true", it will return requirement link back, but I still can not find TCER links. 
     
     So I am wondering whether any other options should I configure to get Test Case Execution Record links related to a specific Test case? 
 
      Thanks!

Best Regards,
Jane Zhou

2 answers



-1
permanent link
Pragnya Priyadarshini (39) | answered Nov 30 '17, 2:44 p.m.

 Here is the URL to find out Test Case Execution Record link of a specific test case

https://<host>:<port>/<contextRoot>/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project area>/executionworkitem?fields=feed/entry/content/executionworkitem/testcase[(@href = '<testcase url>')]

And testcase url would be something like as below
https://<host>:<port>/<contextRoot>/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<Project Area/testcase/urn:com.ibm.rqm:testcase:<Unique ID>


Comments
Michael Triantafelow commented Nov 30 '17, 4:08 p.m.

I don't think this is quite right.  I think your query URL filters out all the properties of the executionworkitem except for the testcase property.


Michael Triantafelow commented Nov 30 '17, 4:10 p.m.

I don't think this is quite right.  You are filtering out all the properties of the executionworkitem.  You need to put the "testcase/" part inside the query part of the expression (as in my answer) to avoid selecting only the testcase property.


permanent link
Michael Triantafelow (4513) | answered Nov 30 '17, 9:16 a.m.

The reason you don't see it is because the relationship goes in the other direction (from TCERs to test cases).  What you'll need to do is use the "fields" parameter to query the TCER feed for the one that is associated with the test case you are interested in.


I didn't test this, but the syntax would be something like:

[public repo url]service/com.ibm.rqm.integration.service.IIntegrationService/resources/[project]/executionworkitem?fields=feed/entry/content/executionworkitem[testcase/@href='[testcase url]']/*

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.