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
|
Accepted answer
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
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.
Krishnananda L S
commented Sep 17 '18, 8:54 a.m.
"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.
Krishnananda L S
commented Sep 17 '18, 10:14 a.m.
Thanks Paul, I was missing the url encoding part. It is working now. :) |
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.