It's all about the answers!

Ask a question

How to update a testcaseresult (executionresult) with a different iteration (testphase) using the REST API

Daniel Crone (41) | asked Jan 06 '21, 10:28 a.m.

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 (


We are on version 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:testphase href="https://{server:port}/qm/service/{project}/testphase/"/>


Secondly, I take that payload and modify the testphase to :

<ns2:testphase href="https://{server:port}/qm/service/{project}/testphase/"/>

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

    <rqm:resultId xmlns:rqm="">1111</rqm:resultId>

    <rqm:resultItemId xmlns:rqm="">{someStateId}</rqm:resultItemId>

    <rqm:resultExternalId xmlns:rqm=""></rqm:resultExternalId>



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




One answer

permanent link
Subhajit Bhuiya (6222) | answered Jan 07 '21, 2:18 a.m.

Test phase is NOT set directly from the execution result.  It is always extracted from the associated TER.

From the schema documentation
[READ-ONLY] Since  The Test Phase associated with the test execution.  Note, resolved from the associated executionworkitem.

Daniel Crone commented Jan 07 '21, 3:06 a.m.

Hi Subhajit, 

Thanks for that, interestingly, I had already updated the TER test phase, this is why I was trying to update the TR to bring it in line, so it would appear that it does not extract it from the current version of the TER? What would I need to do to bring these two in line?
Also I had a look at executionresult.xsd and could not find the reference to testphase, which xsd should I be looking at please?

Your answer

Register or to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.