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

How to add a Requirement link to a RQM testcase using Rest API

  Hi,

I am trying to add oslc_qm:validatesRequirement  (Requirementlinks) to a RQM test case. I am hitting this url https://server/rqm0001001/service/com.ibm.rqm.integration.service.IIntegrationService/resources/_vjvTYgXaEea1H9WCwoPWVQ/testcase/urn:com.ibm.rqm:testcase:253.

The requestbody is
<?xml version="1.0" encoding="UTF-8"?><ns2:testcase xmlns:ns2="http://jazz.net/xmlns/alm/qm/v0.1/" xmlns:ns1="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:ns3="http://schema.ibm.com/vega/2008/" xmlns:ns4="http://purl.org/dc/elements/1.1/" xmlns:ns5="http://jazz.net/xmlns/prod/jazz/process/0.6/" xmlns:ns6="http://jazz.net/xmlns/alm/v0.1/" xmlns:ns7="http://purl.org/dc/terms/" xmlns:ns8="http://jazz.net/xmlns/alm/qm/v0.1/testscript/v0.1/" xmlns:ns9="http://jazz.net/xmlns/alm/qm/v0.1/executionworkitem/v0.1" xmlns:ns10="http://open-services.net/ns/core#" xmlns:ns11="http://open-services.net/ns/qm#" xmlns:ns12="http://jazz.net/xmlns/prod/jazz/rqm/process/1.0/" xmlns:ns13="http://www.w3.org/2002/07/owl#" xmlns:ns14="http://jazz.net/xmlns/alm/qm/qmadapter/v0.1" xmlns:ns15="http://jazz.net/xmlns/alm/qm/qmadapter/task/v0.1" xmlns:ns16="http://jazz.net/xmlns/alm/qm/v0.1/executionresult/v0.1" xmlns:ns17="http://jazz.net/xmlns/alm/qm/v0.1/catalog/v0.1" xmlns:ns18="http://jazz.net/xmlns/alm/qm/v0.1/tsl/v0.1/" xmlns:ns20="http://jazz.net/xmlns/alm/qm/styleinfo/v0.1/" xmlns:ns21="http://www.w3.org/1999/XSL/Transform"><ns4:identifier>https://rtc-test.intel.com/rqm0001001/service/com.ibm.rqm.integration.service.IIntegrationService/resources/_vjvTYgXaEea1H9WCwoPWVQ/testcase/urn:com.ibm.rqm:testcase:254</ns4:identifier><ns4:title>Test9</ns4:title> <ns1:Description> <ns11:validatesRequirement ns1:resource="https://dngserver/rrc/resources/_wX-wca_TEeat6Ob-AYwi2w"/></ns1:Description></ns2:testcase>

The title filed is gettong updated but the Requirements links are not. 

Appreciate your help.

-Jyothi

1 vote


Accepted answer

Permanent link
Looks like you're using the RQM Reportable REST API with a RQM OSLC API  property (oslc_qm:validatesRequirement ).  The RQM Reportable REST API does not support linking requirements to test artifacts (see https://jazz.net/wiki/bin/view/Main/RqmApi#Requirement).  Instead, use the RQM OSLC API.
Ralph Schoon selected this answer as the correct answer

0 votes

Comments

Hi Paul,

Can you please explain how to create the link from Test Case to a requirement.

A method is available as .. testCase.addValidatesrequirements(new Link (new URI () ))

but I am not able to put the implementation properly..

Please let me know.

Thanks
Vaibhav

Vaibhav, I can't comment on your implementation (e.g. testCase.addValidatesrequirements(new Link (new URI () ))) but I can suggest you use the RQM OSLC QM API.  Read over the WIKI on the API and try to add the requirement link to the test case using an external HTTP client like Poster or Advanced REST client.


One other answer

Permanent link

Hi Vaibhav, 


Have you gotten the answer for this question yet? I am facing the same problem as you.
If yes, could you give me the example request body. 

Many thanks

0 votes

Comments

The question is years old, it is not marked as answered and reading it shows that the suggestion was not followed. Please ask your own question providing the necessary information such as version numbers etc.

Note that the suggestion is to use a different API for link creation

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
× 10,968

Question asked: Nov 29 '16, 12:45 a.m.

Question was seen: 5,350 times

Last updated: Jun 01 '22, 7:51 a.m.

Confirmation Cancel Confirm