It's all about the answers!

Ask a question

Can I use RQM REST API to link an RTC story to a Test Case?


Bob Wang (482119) | asked Aug 31 '12, 3:58 p.m.
I can link an RTC story (work item) to an RQM test case in UI. When I use RQM REST API GET method to retrieve the XML representation of that test case, I noticed that the RTC story is in element <workitem>. Then, I tried to add <workitem> element to another test case xml, and tried to use RQM REST API to link the same RTC story to another test case, but it didn't link them.

Can I use RQM REST API to link an RTC story to the test case?

2 answers



permanent link
Rosa Naranjo (2.8k11420) | answered Aug 31 '12, 5:26 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
Bob
You should be able to do this via the OSLC API.  Try out the OSLC workshop on Jazz.net.  Find out more information about OSLC at the OSLC Home Webpage

permanent link
Paul Slauenwhite (8.3k12) | answered Sep 05 '12, 10:21 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
Yes, you can use the OSLC QM API (see http://open-services.net/bin/view/Main/QmSpecificationV2?sortcol=table;up=#Resource_TestCase).  Note, https://jazz.net/wiki/bin/view/Main/RqmApi#ResourcesFootnote8 for the RQM Reportable REST API.

Comments
Gary Dang commented May 22 '15, 8:25 p.m.

I am trying to update the RQM test case to link to RTC work item.  However, I am only able to update attributes of the test case but not able to update the link (e.g. using oslc_qm:relatedChangeRequest).  Would appreciate if you provide an example of what the XML input looks like?
I also tried updating the RTC work item and link it to RQM test case using the following XML but existing links are deleted and replaced with nothing..

<?xml version="1.0" encoding="UTF-8"?>

<oslc_cm:ChangeRequest xmlns:oslc_cm="http://open-services.net/xmlns/cm/1.0/" xmlns:dc="http://purl.org/dc/terms/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:calm="http://jazz.net/xmlns/prod/jazz/calm/1.0/" xmlns:rtc_cm="http://jazz.net/xmlns/prod/jazz/rtc/cm/1.0/">;

 <oslc_cm:testedByTestCase rdf:resource="https://<server>/qm/oslc_qm/contexts/<contextID>/resources/com.ibm.rqm.planning.VersionedTestCase/_BfhhgwC2EeWDf4S33X1zJw"/>;

</oslc_cm:ChangeRequest>


Paul Slauenwhite commented May 23 '15, 10:32 a.m. | edited May 23 '15, 10:33 a.m.
FORUM MODERATOR / JAZZ DEVELOPER

Hi Gary,

Try:

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
  ...>
 <oslc_qm:TestCase rdf:about="https://<QM host>:<QM port>/<QM context root>/oslc_qm/contexts/QM <project area UUID>/resources/com.ibm.rqm.planning.VersionedTestCase/<test case UUID>">
  ...
  <oslc_qm:testsChangeRequest rdf:ID="n0" rdf:resource="https://<CCM host>:<CCM port>/<CCM context root>/..."/>
    ...
 </oslc_qm:TestCase>
 <rdf:Description rdf:about="#n0">;
  <dcterms:title>1342: Demo Story</dcterms:title>
 </rdf:Description>
</rdf:RDF>

Your answer


Register or to post your answer.