How to get the test case title when querying TestPlan?
When we query a TestPlan with RESTAPI, example,
https://<serverUrl>/com.ibm.rqm.integration.service.IIntegrationService/resources/<projectUUID>/testplan/urn:com.ibm.rqm:testplan:<ID>
, we only get the link to test cases.
Our requirement is to get the TestCase Title/creator details when querying a TestPlan and avoid querying separately for test case inside the testplan? Is this possible? How?
2 answers
The APIs work as the APIs work. Just because you would like to or prefer to get the data in a different way, does not make it a requirement.
I have not used the Reportable REST Api for ETM, but it is absolutely typical for these APIs to only provide the link for the elements in a collection. This then requires another API call for each element, to get the details. This is how the OSLC API works.
Using Reportable REST API, following details of the test case related to a TestPlan, can be fetched.
- /usesTestCase/TestCase/title14, 16
- /usesTestCase/TestCase/description14, 16
- /usesTestCase/TestCase/shortId14, 16
- /usesTestCase/TestCase/created14, 16
- /usesTestCase/TestCase/modified14, 16
- /usesTestCase/TestCase/creator14, 16
- /usesTestCase/TestCase/contributor14, 16
Reference: RQM API Wiki documentation
Here is a sample to start with....
https://<elmhost>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<projectUUID>/testplan?fields=feed/entry/content/testplan%5Btitle=%22Sample%22%5D/(usesTestCase/TestCase/title)