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.
 Hi,

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
Reshma Ratnani (1.1k1) | answered Sep 08 '15, 1:31 a.m.
JAZZ DEVELOPER
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 https://jazz.net/wiki/bin/view/Main/RQMURLUtility  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

Comments
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/com.ibm.rqm.integration.service.IIntegrationService/resources/project area/executionresult/urn:com.ibm.rqm:executionresult:id

Can some one give the schema of xml?


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
Sridhar


Comments
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:
https://jazz.net/wiki/bin/view/Main/RqmApi#Nested_PUT


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 jazz.net 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.



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.