Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

0 votes


Accepted answer

Permanent link
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

0 votes

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

Permanent link
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

1 vote

Comments

Hi Arllen,

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

Regards,
Shamrose


Permanent link
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'])

0 votes

Comments

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 log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,023
× 136

Question asked: Mar 11 '16, 6:00 a.m.

Question was seen: 4,836 times

Last updated: Mar 15 '16, 2:40 a.m.

Confirmation Cancel Confirm