How to extract testcases pertaining to a Test Suite from Rational Quality Manager in Rational Publishing Engine?
Hi Everyone,
I am designing a RPE Template for generating a Software Test Plan Document, I want to extract the Test Cases pertaining to a Test Suite in Rational Quality Manager, but the testsuite API available from the Data Source Schema in RPE has provision only for id(UUID) and href(URL)..
Can anyone suggest solution for extracting these testcases from RPE?
Further to this please find the Environmental Details:
RPE Version: 1.3
RQM Version:5.0.2
OS: Windows 7
Thanks in Advance,
Shamrose
I am designing a RPE Template for generating a Software Test Plan Document, I want to extract the Test Cases pertaining to a Test Suite in Rational Quality Manager, but the testsuite API available from the Data Source Schema in RPE has provision only for id(UUID) and href(URL)..
Can anyone suggest solution for extracting these testcases from RPE?
Further to this please find the Environmental Details:
RPE Version: 1.3
RQM Version:5.0.2
OS: Windows 7
Thanks in Advance,
Shamrose
Accepted answer
Correct. To get testcases for multiple testsuites, you have 2 options:
1. Using "or" in fields parameter. That is, <feedUrl>?fields=feed/entry/content/testplan/testcase?fields=feed/entry/content/testcase/(*|testsuite[(@href='<resourceUrl1>' or @href='<resourceUrl2>')])
2. Do GET for each testsuite.
Add 2 qm feed schemas in the template (testsuite and testcase). Use testsuite data source and get the "identifier" for each testsuite, build the URL using script expression (as mentioned in answer) and set it as URI for the Data Source Configuration element in RPE (Target data source=testcase and Inherited data configuration=testsuite). Add a query from testcase data source to get the testcases.
1. Using "or" in fields parameter. That is, <feedUrl>?fields=feed/entry/content/testplan/testcase?fields=feed/entry/content/testcase/(*|testsuite[(@href='<resourceUrl1>' or @href='<resourceUrl2>')])
2. Do GET for each testsuite.
Add 2 qm feed schemas in the template (testsuite and testcase). Use testsuite data source and get the "identifier" for each testsuite, build the URL using script expression (as mentioned in answer) and set it as URI for the Data Source Configuration element in RPE (Target data source=testcase and Inherited data configuration=testsuite). Add a query from testcase data source to get the testcases.
Comments
2 other answers
This blog shows how to query the RQM REST API in multiple ways, including a query to find test cases in a specific test suite (search for "Test Cases included in Test Suite"):
https://sleroyblog.wordpress.com/2013/04/09/querying-rqm-40-through-oslc-and-rest-api/
Hope this helps,
Arllen
https://sleroyblog.wordpress.com/2013/04/09/querying-rqm-40-through-oslc-and-rest-api/
Hope this helps,
Arllen
You cannot get the testcases from testsuite API. Instead, you can retrieve the collection of testcases for a given testsuite using filtering capabilities (https://jazz.net/wiki/bin/view/Main/RqmApi#fields).
In RPE template, you can use a DSC element to configure the URI (Dynamic configuration->URI). You can append
"?fields=feed/entry/content/testcase/(*|testsuite[@href='" + identifier + "'])" to testcase feed URL so as to get URL like following one:
https://server:port/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<ProjectArea>/testcase?fields=feed/entry/content/testcase/(*|testsuite[@href='https://server:port/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<ProjectArea>/testsuite/urn:com.ibm.rqm:testsuite:1'])
In RPE template, you can use a DSC element to configure the URI (Dynamic configuration->URI). You can append
"?fields=feed/entry/content/testcase/(*|testsuite[@href='" + identifier + "'])" to testcase feed URL so as to get URL like following one:
https://server:port/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<ProjectArea>/testcase?fields=feed/entry/content/testcase/(*|testsuite[@href='https://server:port/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<ProjectArea>/testsuite/urn:com.ibm.rqm:testsuite:1'])