How to update the 'Actual Result' field of Test Result, via REST API?
Accepted answer
You need to find the REST URI for the test result first, then use a PUT to modify it.
The resource URI for the test result should look like
https://clm406:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/_ZcMRAK2SEeO_fciXVKJ7Tg/executionresult/urn:com.ibm.rqm:executionresult:34
where "_ZcMRAK2SEeO_fciXVKJ7Tg" is the UUID for the project and it is definitely different in your environment, and "34" is the web Id for the test result in this sample.
You can use a GET command to retrieve the current content of the test result, and save it as a text/XML file. Next, modify the file by removing all the attributes except for <ns2:stepResults>. Then, find the <ns2:actualResult> attribute of the corresponding step and modify its content. Finally you can use a PUT command to modify the test result by using the same resource URI and the modified file.
Note that you can only modify the step results as a whole - including all steps, all expected results and all actual results. Do not remove anything within <ns2:stepResults>, otherwise the same will be removed from the test result when you use PUT to modify it.
The resource URI for the test result should look like
https://clm406:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/_ZcMRAK2SEeO_fciXVKJ7Tg/executionresult/urn:com.ibm.rqm:executionresult:34
where "_ZcMRAK2SEeO_fciXVKJ7Tg" is the UUID for the project and it is definitely different in your environment, and "34" is the web Id for the test result in this sample.
You can use a GET command to retrieve the current content of the test result, and save it as a text/XML file. Next, modify the file by removing all the attributes except for <ns2:stepResults>. Then, find the <ns2:actualResult> attribute of the corresponding step and modify its content. Finally you can use a PUT command to modify the test result by using the same resource URI and the modified file.
Note that you can only modify the step results as a whole - including all steps, all expected results and all actual results. Do not remove anything within <ns2:stepResults>, otherwise the same will be removed from the test result when you use PUT to modify it.
One other answer
Hi Liora,
this is not the answer ,but i can't comment
Were you able to update the <actual results> ? if yes, then let me know please at this link
https://jazz.net/forum/questions/272963/test-case-actual-results-are-not-modified-in-rqm-after-completion-of-put-request-successfully
I am having the same problem. I can modify the <title> but unable to modify the <actual results> .
My PUT request's response is OK.