How to extract testcases pertaining to a Test Suite from Rational Quality Manager in Rational Publishing Engine?
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
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
Hi Prasad,
I am able to get the test Suite Title. However I am unable to get the Test Cases pertaining to the Test Suite by providing the below URL,while configuring the Data Sources of Test Cases :
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'])
Whether we have to configure the above URL for Test Suite or for Test Case?While Configuring the Data Sources for generating the Document.
I have also added the Data Source Configuration keeping the Test Case as Target Data Source and Test Suite as Inherited Data Source, but unable to get the Test Cases
Can you Please send a sample Template for Reference.
Regards,
Shamrose
You need to configure above URL for for testcase data source (which you may mark as hidden data source). For testsuite data source, you have to set the datasource URI https://server:port/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<projectarea>/testsuite?abbreviate=false along with user credentials.
As I cannot attach the .dta here, you can refer the screenshot. For the Data Source Configuration element, I have set following Script Expression as URI:
_testcaseFeedUrl + "?fields=feed/entry/content/testcase/(*|testsuite[@href='" + _testsuiteHref + "'])";
Please let me know if you are unable to design the template / get the expected output.
Regards,
Prasad
Hi Prasad,
Thanks for the valuable help, I am able to get the Test Suites and its related Test Cases.
Thanks Once Again!
Regards,
Shamrose
2 other answers
https://sleroyblog.wordpress.com/2013/04/09/querying-rqm-40-through-oslc-and-rest-api/
Hope this helps,
Arllen
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'])