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

Is there a rest api in rqm to validate a test case is present in a project area by using the test case title?

 Hi,

I am trying to validate if a test-case is present in a project area. I need to do it in two ways, 1) by using test-case title 2) by using test-case id ( I got the solution for this)

I have read other post where I can use
1) https://<url>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project area>/testcase
2) https://<url>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project area>/testcase/urn:com.ibm.rqm:testcase:'test-casae title' (This does not work, for obvious reason, "urn:com.ibm.rqm.testcase" cannot be use with string)

The first option returns a huge amount of xml data which is causing problem while transferring it from rqm server.

Is there any way to solve this problem?

Thanks,
Krishnananda

0 votes


Accepted answer

Permanent link

Hi Krishnananda,


Try:

GET https://<url>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project area>/testcase/<id>

See https://jazz.net/wiki/bin/view/Main/RqmApi#id for the different types of IDs.

Or you can try fields filtering:

GET https://<url>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project area>/testcase?fields=feed/entry/content/testcase[title='test case title']/*

See https://jazz.net/wiki/bin/view/Main/RqmApi#fields for more information on fields filtering.

Krishnananda L S selected this answer as the correct answer

0 votes

Comments

https://<url>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/IP%2BDevelopment/testcase?fields=feed/entry/content/testcase[title='MRD-WF-I&O_Reultls_Chart_Displayed_I&02G']/* 


This is the query I am sending. I get a uri exception - "org.apache.commons.httpclient.URIException: Invalid query" while doing this. What may be wrong here?  <url> is replaced with the correct url, fyi.

"See https://jazz.net/wiki/bin/view/Main/RqmApi#id for the different types of IDs. "  There is no ID corresponding to title.

Hi Krishnananda,


You need to URL-encode the query value for the fields filter.  Also, IDs are not titles.  Use fields filtering for querying based on the title and the resource URL (with the ID) for request a specific resources.

 Thanks Paul, I was missing the url encoding part. It is working now. :)

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
× 12,023

Question asked: Sep 17 '18, 4:48 a.m.

Question was seen: 1,667 times

Last updated: Sep 17 '18, 10:14 a.m.

Confirmation Cancel Confirm