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

[closed] How to add requirement links to execution result steps from the API?

We are working on a solution where we insert results from the API with detailed steps results.  We have the basics working (TCER->Result->Steps).  The missing piece for us is the step result's requirement links.

We're using the RQMApi documents:
https://jazz.net/wiki/bin/view/Main/RqmApi

And we're using Lyo to authenticate.

Currently, we have API code that works to do the following:

1.  Create a new test result with step details (using REST Post mechanism)
2.  Get the result above using OSLC
3.  Get each step of the result above using OSLC
4.  Edit the step details to add validates requirement link
5.  PUT the step back using OSLC (This is where we get a 409 Conflict Error)

Additionally, in the log we see this:
2018-09-18 16:22:43,673 [Default Executor-thread-249883 @@ 16:22 user <Apache-HttpClient/4.5.2 (Java/1.8.0_144)@10.5.80.92> /qm/oslc_qm/contexts/_swTyIZTZEeiLrtWwoNv-HQ/resources/com.ibm.rqm.execution.ExecutionElementResult/_ZlHZxLtTEeiF6Lc-HE-ecA]  INFO com.ibm.rqm.oslc.service                            - OslcUtils:logMessage AQXCM5009E http://SERVER/qm/oslc_qm/contexts/_swTyIZTZEeiLrtWwoNv-HQ/resources/com.ibm.rqm.execution.ExecutionElementResult/_ZlHZxLtTEeiF6Lc-HE-ecA was not executed because a lifecycle operation error occurred.
com.ibm.rqm.oslc.common.OslcLifecycleOperationException: operation is not supported
 at com.ibm.rqm.oslc.execution.TestScriptStepResultLifecycleManager.update(TestScriptStepResultLifecycleManager.java:92)
 at com.ibm.rqm.oslc.execution.TestScriptStepResultLifecycleManager.update(TestScriptStepResultLifecycleManager.java:1)
 at sun.reflect.GeneratedMethodAccessor1265.invoke(Unknown Source)
 
Our question is twofold:
1.  Can we add requirement links to execution result steps from the API?
2.  How do we do it?

Thanks,

Jayesh

A key snippet of code is below (Reading, Editing and Putting the step result):
 String stepResString = EntityUtils.toString(stepResponse.getEntity());
 Document stepDoc = db.parse(new InputSource(new StringReader(stepResString)));
 String stepUrl = stepDoc.getElementsByTagName("dcterms:identifier").item(0).getTextContent();
 String stepUUID = stepUrl.substring(stepUrl.lastIndexOf("/"));
 String first = stepResString.substring(0,stepResString.indexOf("<process:projectArea"));
 String second = stepResString.substring(stepResString.indexOf("<process:projectArea"));
 String finalString = first + "<oslc_qm:validatesRequirement rdf:resource=\"

0 votes


The question has been closed for the following reason: "The question is answered, right answer was accepted" by rschoon Sep 19 '23, 7:57 a.m.

Accepted answer

Permanent link
Hi,
RQM does not support adding requirement links to execution result steps from UI?
Same goes for OSLC API as well. RQM does not have support for creating/adding/updating/removing test script step results (including requirement and defect links) when creating/updating test execution results using the OSLC QM API.

However - You could choose to add requirement links to test script steps before running the Test Case. This way after execution is completed, the step of created test case result would show desired requirement link.
Jayesh Gaikar selected this answer as the correct answer

0 votes

Comments

Thank You Abhishek...!


2 other answers

Permanent link

Hi Jayesh,


Unfortunately, creating/updating/deleting test script step results using the OSLC QM API is not supported.  For more information, see enhancement Support creating/adding/updating/removing test script step results when creating/updating test execution results using the OSLC QM API. (166236).

0 votes

Comments

Thank You Paul...!


Permanent link

Is it possible to update test script step results via OSLC QM API with requirement links in version 7.0.2? If not, is it planned for future? In ticket https://jazz.net/jazz02/web/projects/Rational%20Quality%20Manager#action=com.ibm.team.workitem.viewWorkItem&id=179279 the support is discarded

0 votes

Comments

Please ask your own questions. Do not ask your questions in answers to other users questions. Thank you.  

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
× 10,943

Question asked: Sep 19 '18, 10:19 a.m.

Question was seen: 6,174 times

Last updated: Sep 19 '23, 7:57 a.m.

Confirmation Cancel Confirm