It's all about the answers!

Ask a question

[closed] How to link test case to requirement using OSLC API

udi valer (1111) | asked May 21 '17, 9:13 a.m.
closed Apr 12 '22, 2:07 a.m. by Ralph Schoon (62.7k33643)


I was able to update the requirement link to test case in RM project - means i can see the requirement is validate by the test case in the UI.

I was able to do that using update oslc_rm:validatedBy + rdf:Description in the requirement.

But when i move to the test case Requirement Links it is empty!

I tried to update the test case using the REST API but apparently it is impossible.

How can i do that using OSLC API?

udi valer commented May 24 '17, 2:07 a.m.


Adding some more information:
i was able to POST new test case with new requirement but i can't update existing test case with new requirement.

I used GET on url:

But when i changed even only the title and try to PUT o url:

Error 405 or 400 occurred.
Any ideas?

The question has been closed for the following reason: "Other" by rschoon Apr 12 '22, 2:07 a.m.

2 answers

permanent link
Sunil Kumar R (1.1k12944) | answered May 24 '17, 3:09 a.m.

Hi Udi Valer,

You could retry the same steps using REST URLs for RQM artifacts.
Here is a cheat sheet for querying rqm through rest api so try the steps below:

1. Create a testcase resource in the web UI.
2. GET the resource XML using the API.
3. Update a property in the resource XML.
4. PUT the resource XML using the API.

Let me know how it goes.. 

Best Regards

udi valer commented May 24 '17, 3:14 a.m.

 Hi Sunil,

I understood from your support that i can't update requirement in test case using REST so i used OSLC.

I'm familiar with REST APi and was able to update test cases but when updated requirement inside test case it wasn't succeed.

Are you sure that i can do it from REST?


permanent link
joseph gatta (111) | answered Aug 23 '17, 3:32 p.m.

 Found the issue.

String queryCapability11 = client.lookupQueryCapability(
 serviceProviderUrl ,
 OSLCConstants.OSLC_QM_V2 ,
OSLC constants were incorrect.