It's all about the answers!

Ask a question

How to link test case to requirement using OSLC API


udi valer (111) | asked May 21 '17, 9:13 a.m.

 Hi,


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?


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

 HI.

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?

2 answers



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

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
Sunil


Comments
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?

Thanks,
Udi


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

 Found the issue.

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

Your answer


Register or to post your answer.