It's all about the answers!

Ask a question

How to update run status of a test case in RQM using REST API?

libin sebastian (1746) | asked Sep 07 '15, 10:27 a.m.

I am new to IBM Tools.I have created an automation framework to execute the test cases sequentially.I need to report the status of the run and customized html report generated by the framework back to RQM after each run.Can some one give some sample code to start with?

3 answers

permanent link
Matthias Buettgen (23612332) | answered Jan 12 '18, 6:40 a.m.

Hi libin.

From my point of you depends a correct answer to your question a bit on how you design your automation environment and which adapter you're using.

If you're new to RQM I assume you use the Command Line Adapter provided by IBM to trigger your automations. So the adapter usually returns certain information automatically. You should also be able to upload a custom html report as file attachment and append it to execution result. There exists a quite good article on describing the usage.
Nevertheless the report won't be embedded into the RQM execution result page which means the report needs to be opened in a separate window.
In case you're familiar with Java it should be possible to extend the command line adapter if you'd like to embed the html report to the Execution Results web page. The adapter source code should be part of the download package.

Another alternative for test automation is the OSLC Lyo Framework. There exist an out-of-the-box test adapter sample which can be extended using Java. With Lyo you're able to include result reports right into the execution result page.

Find more information about Lyo on the Eclipse project web page and the above mentioned adapter source code can be found in the Lyo Git repository available here.

permanent link
DUm Dum (211) | answered Jan 09 '18, 11:07 a.m.

 Hi Libin,

Were you able to solve your issue. If yes can you please guide me solving the issue. If possible can you please provide a sample code.

Thank you

Kenji Sarai commented Jan 12 '18, 1:39 a.m. | edited Jan 12 '18, 1:42 a.m.

Have a look at this how to create xml to specify the target for PUT/POST request:

permanent link
Reshma Ratnani (1.1k1) | answered Sep 08 '15, 1:31 a.m.
Hi libin,

You can try using RQMUrlUtility to update the execution result of the Test Case. You can also attach a file to TestCase Result. Refer  for more details. Its an open source utility so you can even refer the code how we use the RQM Reportable REST API to create/update TestArtifact in RQM

libin sebastian commented Sep 10 '15, 4:34 a.m.

 Hi Reshma,

    Thanks for for your quick response.I am new to IBM tools.It would be great if you can provide a sample code for updating test case status using RQM utility.Attached is the screenshot of the Test plan.I would like to update the status of a test case with ID:6 as Passed or Failed.

libin sebastian commented Sep 10 '15, 5:56 a.m.

 I got the command to update the execution results as below -

java -jar RQMUrlUtility.jar -command GET -user ADMIN -password ADMIN -filepath file.xml -url https://localhost:9443/jazz/service/ area/executionresult/

Can some one give the schema of xml?

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.