[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=\"
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
2 other answers
Hi Jayesh,
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