How to update a testcaseresult (executionresult) with a different iteration (testphase) using the REST API
![]() Hi I am using Postman and the REST API to update a testcaseresult (aka executionresult) with a different iteration (aka testphase). I will leave out the authentication piece as this is working as per the guidance here: Using Postman to issue a HTTP(S) request (ibm.com)
We are on version 6.0.6.1 of RQM and Jazz.
Firstly, I perform a GET to pull the xml for an testcaseresult (aka executionresult) :
This works and brings back my testcaseresult (aka executionresult) : <?xml version="1.0" encoding="UTF-8"?> <ns2:executionresult...> <ns2:testphase href="https://{server:port}/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/{project}/testphase/urn:com.ibm.rqm:testphase:72"/>
Secondly, I take that payload and modify the testphase to : <ns2:testphase href="https://{server:port}/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/{project}/testphase/urn:com.ibm.rqm:testphase:227"/> Which is the testphase I want and is in the correct test plan schedule.
Lastly, I then use this as my body payload for a PUT with the same url as above. The return is a 200 Okay: <entry xmlns:rqm="http://schema.ibm.com/rqm/2007#executionresult" xmlns="http://www.w3.org/2005/Atom"> <rqm:resultId xmlns:rqm="http://schema.ibm.com/rqm/2007#executionresult">1111</rqm:resultId> <rqm:resultItemId xmlns:rqm="http://schema.ibm.com/rqm/2007#executionresult">{someStateId}</rqm:resultItemId> <rqm:resultExternalId xmlns:rqm="http://schema.ibm.com/rqm/2007#executionresult">urn:com.ibm.rqm:executionresult:1111</rqm:resultExternalId> </entry>
This tells me that it has worked but it did not update the iteration (aka testphase).
Interestingly, this is not shown as an editable or linked item in the UI:
Please note that I can successfully update other fields in the testcaseresult (aka executionresult).
Any light anyone can shed on this would be much appreciated
Regards, Danny. |