It's all about the answers!

Ask a question

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


Binoy Udayan (11) | asked Jun 12 '23, 7:40 a.m.
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

One answer



permanent link
David Honey (1.8k17) | answered Jun 12 '23, 9:53 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Jun 12 '23, 10:22 a.m.

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.


Comments
Binoy Udayan commented Jun 20 '23, 2:12 p.m.
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


Binoy Udayan commented Jun 20 '23, 2:47 p.m.


David Honey commented Jun 21 '23, 4:34 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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.

David Honey commented Jun 21 '23, 4:41 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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.


Binoy Udayan commented Jun 23 '23, 3:43 p.m.

hi David,
Thank you for the detailed answer.

showing 5 of 6 show 1 more comments

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.