It's all about the answers!

Ask a question

How to extract testcases pertaining to a Test Suite from Rational Quality Manager in Rational Publishing Engine?


Shamrose Makandar (1336) | asked Mar 11 '16, 6:00 a.m.
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

Accepted answer


permanent link
Subramanya Prasad Pilar (4.6k15) | answered Mar 14 '16, 1:31 a.m.
edited Mar 14 '16, 2:44 a.m.
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.


Shamrose Makandar selected this answer as the correct answer

Comments
Shamrose Makandar commented Mar 14 '16, 7:42 a.m.

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



 


Subramanya Prasad Pilar commented Mar 14 '16, 11:33 a.m. | edited Mar 14 '16, 12:23 p.m.

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


Shamrose Makandar commented Mar 15 '16, 2:40 a.m.

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



permanent link
Arllen Acevedo (261) | answered Mar 11 '16, 7:07 a.m.
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

Comments
Shamrose Makandar commented Mar 14 '16, 12:14 a.m.

Hi Arllen,

Thanks for the reply, the link which you have sent is quite useful.

Regards,
Shamrose


permanent link
Subramanya Prasad Pilar (4.6k15) | answered Mar 13 '16, 4:06 p.m.
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'])

Comments
Shamrose Makandar commented Mar 14 '16, 12:22 a.m.

Hi Prasad,

Thanks for the reply,

The URL which you have provided fetches Test Cases pertaining to a single Test Suite(If I am not wrong), Can we get the Test Cases for multiple test Suites?
Please let me know,

Regards,
Shamrose


Your answer


Register or 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.