Is it possible to create requirement link to test case with both requirement id and requirement link using OSLC API
One answer
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
Thank you
This is exactly what I'm doing now: https://www.ibm.com/support/pages/how-add-requirement-links-existing-test-cases
-
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+xmlorapplication/x-turtlein theAcceptheader. -
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-TypeandIf-matchheaders (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.