It's all about the answers!

Ask a question

How to create a TER for a given test case-id using a REST call


Garret O'Keeffe (111) | asked May 22 '14, 12:03 p.m.
 Hi,
As part of our automation framework which we are developing (using selenium), we need to do the following in code
Open Test Case in RQM <given test case-id>
Create a Test Execution Request (passing in options for project-name, release version, browser under test..)
  Record the TER-id from the creation request
  Run our Automation script corresponding to <given test case-id>

I'd like to try and figure out the REST URLs and first test these using say postman / poster
Once I'm able to get postman / poster able to generate a TER based on my supplied options, I'd then code this.

From reading other questions posted, it appears that is possible to do some querying which returns a lot of xml :)
e.g. I can see a services xml file by posting a URL like this:
https://nsjazz.raleigh.ibm.com:8032/jazz/oslc_qm/contexts/_DNIaELwiEd-a_P15jF1E4A/services.xml
However, I'm unsure how to use this services information to say open test case 14464 and create a TER for it

Any help on how to create this TER would be great
Thanks!

2 answers



permanent link
Uday Bhosale (1348) | answered Aug 12 '15, 8:23 a.m.
Hi Reshma,

How can we link an RTC defect with Test Case Execution Result?

I am able to create the TC execution result but unable to link RTC defect with it.

Basically my requirement is, I want to link an RQM test case with RTC defect using REST API. One way I got to know to achieve this is by attaching the defect to an Test case execution result. I tried following - 

we added following xml tag in <StepResult> tag of the execution result xml to generate TC execution result in RQM 

<ns16:properties>

<ns16:property propertyType="rtcdefectView"propertyValue="https://projectintegrationURL/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/120" propertyName="120: Defect name" />

</ns16:properties> 

and as suggested, sent a POST request to 

https://<host>:port>/<contextroot>/service/com.ibm.rqm.integration.service.IIntegrationService/ resources/<projectalias>/executionworkitem 

It created the Execution result in RQM but did not link defect with it. 

Let me know if you know if you know any solution to achieve this.

Thanks in advance.



permanent link
Reshma Ratnani (1.1k1) | answered May 23 '14, 3:54 a.m.
JAZZ DEVELOPER
Hi Garret,

You can GET or POST xml of any artifact using below url

https://<host>:<port>/<contextRoot>/service/com.ibm.rqm.integration.service.IIntegrationService/ resources/<projectAlias>/<resourceType>

So if you want to GET a TestCase in RQM, in browser paste below url. You will get a list of the TestCases. Copy your desired TestCase url and do a GET using POSTER utility. This will give you the xml content of that TestCase

https://<host>:<port>/<contextRoot>/service/com.ibm.rqm.integration.service.IIntegrationService/ resources/<projectAlias>/testcase

If you want to create a TER in RQM, then do a POST to below url using POSTER with xml content having your desired content

https://<host>:<port>/<contextRoot>/service/com.ibm.rqm.integration.service.IIntegrationService/ resources/<projectAlias>/executionworkitem

To get format of TER xml, you can do a GET of any existing TERs in RQM using POSTER

NOTE: You will need to login from UI before using POSTER and while doing a GET or POST add Header (user-agent)

Hope this helps

Thanks

Comments
Reshma Ratnani commented May 23 '14, 3:56 a.m.
JAZZ DEVELOPER

You can get more info in jazz.net wiki page. Link is as below:

https://jazz.net/wiki/bin/view/Main/RqmApi#Feeds

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.