It's all about the answers!

Ask a question

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


Jayesh Gaikar (59215) | asked Sep 19 '18, 10:19 a.m.
closed Sep 19 '23, 7:57 a.m. by Ralph Schoon (63.1k33646)

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=\"

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
abhishek gour (3812) | answered Sep 20 '18, 7:06 a.m.
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

Comments
Jayesh Gaikar commented Nov 04 '19, 2:21 p.m.

Thank You Abhishek...!

2 other answers



permanent link
Paul Slauenwhite (8.4k12) | answered Sep 20 '18, 7:09 a.m.
FORUM MODERATOR / JAZZ DEVELOPER

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).


Comments
Jayesh Gaikar commented Nov 04 '19, 2:21 p.m.

Thank You Paul...!


permanent link
Ralph Geister (134) | answered Sep 19 '23, 7:50 a.m.
edited Sep 19 '23, 7:52 a.m.

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


Comments
Ralph Schoon commented Sep 19 '23, 7:57 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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