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

Is it possible to create requirement link to test case with both requirement id and requirement link using OSLC API

hi

When manually creating a  DOORS Requirement link with an RQM test case, RQM shows the DOORS link as an anchor only exposing the DOOR Requirement id with a hidden DOORS link as follows.

<a href="http://server:port/requirement_slug_id">REQUIREMENT_ID</a>

But when creating the requirement link using OSLC API, we have only one attribute for oslc_qm:validatesRequirement to add the link, but not requirement ID as follows
<oslc_qm:validatesRequirement rdf:resource="http://server:port/requirement_slug_id"/>

So the requirement link in RQM test case will be shown as follows:
<a href="http://server:port/requirement_slug_id">http://server:port/requirement_slug_id</a>

Is it possible to create the link with requirement link and requirement id as it works with manual linking?

Thank you advance.
Binoy

0 votes



One answer

Permanent link

The validates requirement link is owned by and stored in ETM (quality management). The link subject should be the concept URI of the test case, and the value should be the concept URI of the requirement. You should be able to do this via a GET+PUT on a test case. See https://docs.oasis-open-projects.org/oslc-op/qm/v2.1/os/quality-management-shapes.html#TestCaseShape.

0 votes

Comments
Hi David,

Thank you for your answer. I'm afraid I understood your answer completely.

Can you please provide an example of the xml and url to make the GET+PUT request.

Thank you

If you want to update a test case:
  • Determine the URI of the test case you want to update. If you don't know it, you will have to query for it using an OSLC Query Capability for test cases and query by some known property such as oslc:shortId . See https://docs.oasis-open-projects.org/oslc-op/query/v3.0/os/oslc-query.html for details.
  • Perform a HTTP GET on the URI of the test case with an appropriate RDF MIME type such as application/rdf+xml or application/x-turtle in the Accept header.
  • Parse that RDF, update it with an additional RDF statements for links. Place the updated RDF in the body of an HTTP PUT with Content-Type and If-match headers (all standard HTTP and REST stuff) and execute the PUT.

Note that if the test case is in a configuration-enabled project area, you will need to use an oslc_config.context parameter or a Configuration-Context header as per the OSLC Configuration Management specification - see https://docs.oasis-open-projects.org/oslc-op/config/v1.0/ps01/oslc-config-mgt.html#concepts and https://docs.oasis-open-projects.org/oslc-op/config/v1.0/ps01/config-resources.html#configcontext.

hi David,
Thank you for the detailed answer.

showing 5 of 6 show 1 more comments

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,054

Question asked: Jun 12 '23, 7:40 a.m.

Question was seen: 2,218 times

Last updated: Jun 23 '23, 3:43 p.m.

Confirmation Cancel Confirm