It's all about the answers!

Ask a question

How to update TSER with multiple results of test cases in RQM using REST API

Rachel Rogoway (1117) | asked Feb 23 '17, 1:09 a.m.


we are use in RQM for our automation. We have test suite that contains tests case.
and we are updating the results alone.
I need to create/ update state of Test Case Execution Record. I need to update multiple results of test cases at once(- in one PUT request, by REST API), Is that possible?
 I can only successfully create TCER (and update state of TCER), but I want to create multiple TCERs and update multiple TCERs.
(this my PUT request for create TCER:
Is that possible to create TCER with reference to the one TSER using REST API request?


7 answers

permanent link
Paul Slauenwhite (8.4k12) | answered Mar 01 '17, 6:41 a.m.
  1. You can create multiple test artifacts in a single POST request using bulk upload (see  However, each update operation has to be a different request.  Note, test cases are not associated to test results (see  The reference is from test result to test case case execution record to test case.

  2. There aren't references between TCER and TSER (see and

permanent link
Ajay Gera (3137) | answered Aug 23 '17, 8:27 a.m.

Hello Rachel - Can you please post the example for creating new TCER and updating the result via REST API?

permanent link
Rachel Rogoway (1117) | answered Aug 23 '17, 9:16 a.m.

 Oh, that's irrelevant.

Finally- I created the TCER via Excel, while uploading tests cases to RQM.
good luck!

permanent link
Ajay Gera (3137) | answered Aug 23 '17, 9:30 a.m.

Rachel - Actually I am facing issues in creating new TCER and updating the result via REST API that's why I asked for sample code. please share the sample code (if you can).

My requirement is to create a new result without execution and update its status via REST API


permanent link
Rachel Rogoway (1117) | answered Aug 23 '17, 10:09 a.m.
in order to create TCR, you need its TCER url. (to set in xml data)
I don't know how to create TCER. I created via Excel.

in order to get TCERs url,

you have to make GET request to all TCERs and link each TCR its TCER 
(request url = '{serverURL}/service/{project name}/executionworkitem')

and now-
You can post the TCRs with the xml attachment.
(request url = '{serverURL}/service/{project name}/executionresult')


permanent link
Ajay Gera (3137) | answered Sep 01 '17, 7:31 a.m.

Hello Rachel,

Do you have any sample xml which we need to pass in post method?

Ajay Gera

permanent link
Rachel Rogoway (1117) | answered Sep 03 '17, 10:48 a.m.


The XML can be obtained with a GET request:
(request url = '{serverURL}/service/{project name}/executionresult/{123=Any ID of TCR- testcaseresult})

sample XML:
<?xml version="1.0" encoding="UTF-8"?>
<ns2:executionresult xmlns:ns2="" xmlns:ns1="" xmlns:ns10="" xmlns:ns11="" xmlns:ns12="" xmlns:ns13="" xmlns:ns14="" xmlns:ns15="" xmlns:ns16="" xmlns:ns17="" xmlns:ns18="" xmlns:ns20="" xmlns:ns21="" xmlns:ns3="" xmlns:ns4="" xmlns:ns5="" xmlns:ns6="" xmlns:ns7="" xmlns:ns8="" xmlns:ns9="">
   <ns2:projectArea href="{projectArea_url}" alias="{projectAlias_url}" />
   <ns4:creator ns1:resource="{creator_url}">{creator_userName}</ns4:creator>
   <ns6:owner ns1:resource="{owner_url}">{owner_userName}</ns6:owner>
   <ns16:approvalstate ns1:resource="{server_url}/service/"></ns16:approvalstate>
   <ns2:variables />
   <ns16:testcasestateatexecution ns1:resource="{server_url}/service/"></ns16:testcasestateatexecution>
   <ns16:testscriptstateatexecution ns1:resource="{server_url}/service/"></ns16:testscriptstateatexecution>
      <ns16:tester ns1:resource="{tester_user_url}">{tester_user_name}</ns16:tester>
   <ns16:stepResults />
   <ns2:testcase href="{testCase_url}" />
   <ns2:testsuitelog href="{testSuiteResult_url}" elementindex="0" />
   <ns2:testscript href="{testScript_url}" />
   <ns2:labresource href="{labresource_url}" />
   <ns2:executionworkitem href="{testCaseExecutionRecord_url}" />
   <ns2:attachment href="{attachment_url}" />
   <ns2:alias type="string"></ns2:alias>

Good Luck!

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.