Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

RQM Rest Api - How to get and update the state of test plan,test suite,test case and test script.

We are working on a tool which has to get the state of test plan,test suite,test case and test script and then update the same as necessary. Kindly provide the REST API's both GET and POST operations which could do the same.


Help !
Thanks

0 votes



2 answers

Permanent link

The API Docs can be found here(https://jazz.net/wiki/bin/view/Main/RqmApi), but are hard to understand at first.

This table (https://jazz.net/wiki/bin/view/Main/RqmApi#Resources_and_their_Supported_Op) maps the UI name to the REST API name
This table (https://jazz.net/wiki/bin/view/Main/RqmApi#FieldsSelectionNote) shows what fields are available in each resource

To GET/POST/PUT/etc. the resource you'll want to hit an endpoint of this format:
https://<etm-host>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project_name>/<resource_type>/urn:com.ibm.rqm:<resource_type>:<resource_internal_id>

So an example for testcase would be:
https://MyEtmHost/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/MyProject/testcase/urn:com.ibm.rqm:testcase:12345

Running a GET on that will give you an xml that matches the schema documented here: https://jazz.net/products/test-management/api-doc-7.0.3/
POST will require you to build your own xml and upload it to https://<etm-host>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project_name>/<resource_type>

In my opinion the easiest method for building the xml is to pull down an existing resource, edit it, and then push the changed xml back up.

0 votes


Permanent link
The API Docs can be found here(https://jazz.net/wiki/bin/view/Main/RqmApi), but are hard to understand at first.

This table (https://jazz.net/wiki/bin/view/Main/RqmApi#Resources_and_their_Supported_Op) maps the UI name to the REST API name
This table (https://jazz.net/wiki/bin/view/Main/RqmApi#FieldsSelectionNote) shows what fields are available in each resource

To GET/POST/PUT/etc. the resource you'll want to hit an endpoint of this format:
https://<etm-host>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project_name>/<resource_type>/urn:com.ibm.rqm:<resource_type>:<resource_internal_id>

So an example for testcase would be:
https://MyEtmHost/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/MyProject/testcase/urn:com.ibm.rqm:testcase:12345

Running a GET on that will give you an xml that matches the schema documented here: https://jazz.net/products/test-management/api-doc-7.0.3/
POST will require you to build your own xml and upload it to https://<etm-host>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project_name>/<resource_type>

In my opinion the easiest method for building the xml is to pull down an existing resource, edit it, and then push the changed xml back up.


You specifically asked for GET and POST, but to achieve the goal of updating the status, e.g. changing the status of a Test Case from Draft to Approved or updating the result of a Test Case after execution, you will need a PUT operation.


0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 11,053
× 485
× 240

Question asked: Jan 23 '19, 4:12 a.m.

Question was seen: 2,811 times

Last updated: Oct 16, 9:55 p.m.

Confirmation Cancel Confirm