It's all about the answers!

Ask a question

REST API to retrieve list of test case ids from a test plan


0
1
Khuemy Nguyen (1611) | asked Mar 14 '12, 9:40 p.m.
Hi,

Does RQM has an API to retrieve a list of test case ids (WebId) for a given test plan id?

Currently, I have to:
- GET test plan
- loop thru all test cases href in the test plan then GET each test case to retrieve its WebId.

Is there a faster way to get test case ids that are associated with the test plan?

Thanks,

7 answers



permanent link
Paul Slauenwhite (8.4k12) | answered May 02 '12, 10:37 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
Fields selection/filtering is only supported in RQM 3.0.1+ (see https://jazz.net/wiki/bin/view/Main/RqmApi#fields).

permanent link
Julie Geng (1622) | answered Mar 15 '12, 12:44 a.m.
Hi,

I have test cases which are associated with requirements defined in the ReqPro. When I tried to generate some requirement reports in RQM, they all returned empty reports. Not sure if I did wrong or the requirement data is not populated in the RQM data warehouse somehow. Please give me some advice to address this problem.

Thank you!

Julie

permanent link
Hao Wan (1.5k35) | answered Mar 15 '12, 2:59 a.m.
JAZZ DEVELOPER
@khuemy,

you can construct the url like this

<baseUrl>/testcase?fields=feed/entry/content/testcase/(webId|testcaseurn:com.ibm.rqm:testplan:2?fields=feed/entry/content/testplan/testcase/@href'])

this url will get all the testcase ids that linked to testplan urn:com.ibm.rqm:testplan:2

baseUrl:
https://<host>:<port>/ <contextRoot>/service/com.ibm.rqm.integration.service.IIntegrationService>/resources/ <projectAlias>

Hi,

Does RQM has an API to retrieve a list of test case ids (WebId) for a given test plan id?

Currently, I have to:
- GET test plan
- loop thru all test cases href in the test plan then GET each test case to retrieve its WebId.

Is there a faster way to get test case ids that are associated with the test plan?

Thanks,

permanent link
Khuemy Nguyen (1611) | answered Mar 15 '12, 8:09 p.m.
Hi Hao,

The url did not filter only testcase ids that are linked to the testplan. It retrieves all testcase ids from project area. What is missing? Thanks,

Khuemy

@khuemy,

you can construct the url like this

<baseUrl>/testcase?fields=feed/entry/content/testcase/(webId|testcaseurn:com.ibm.rqm:testplan:2
?fields=feed/entry/content/testplan/testcase/@href'])

this url will get all the testcase ids that linked to testplan urn:com.ibm.rqm:testplan:2

baseUrl:
https://<host>:<port>/ <contextRoot>/service/com.ibm.rqm.integration.service.IIntegrationService>/resources/ <projectAlias>

Hi,

Does RQM has an API to retrieve a list of test case ids (WebId) for a given test plan id?

Currently, I have to:
- GET test plan
- loop thru all test cases href in the test plan then GET each test case to retrieve its WebId.

Is there a faster way to get test case ids that are associated with the test plan?

Thanks,

permanent link
Danae Panayiotidou (11) | answered May 01 '12, 10:33 a.m.
Hello,
like khuemy I have also been trying to compose the full URL for the feed that will bring back the Test Cases that belong to a specific Test Plan. I need at least the Test Case Title and Summary for my Test Plan.

I tried the suggestion from Hao and it also brings back all the Test Cases for the project.

I have been reading these instructions which only contain examples for requirements and tried to apply to test cases: http://open-services.net/pub/Main/ReportingHome/Reportable_Rest_Services_Interfaces-OSLC_Submission.pdf

in conjunction with the API: https://jazz.net/wiki/bin/view/Main/RqmApi#SupportedFieldsResources

What am I doing wrong?

I have tried:

https://<server>:9443/jazz/secure/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project>/testcase
?fields=feed/entry/content/testcase/testplan
(brings back every test case in the project)

https://<server>:9443/jazz/secure/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project>/testcase?fields=feed/entry/content/testplan/testcase/@href='https://<server>:9443/jazz/secure/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project>/testplan/urn:com.ibm.rqm:testplan:178']
(brings back every test case in the project)

https://<server>:9443/jazz/secure/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project>/testcase?fields=feed/entry/content/testcase/(webId|testcase
(brings back every test case in the project)

effectively none of them are filtering!
it's the same as if I had typed this:
https://<server>:9443/jazz/secure/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project>/testcase


Can someone please help?

we have RQM v2.0.1.1 iFix 2 (I20110215_1523)

Thank you in advance! :)

permanent link
Shivakumar M J (6) | answered May 02 '12, 2:52 a.m.
Hi,
Can we get the data from RQM URL using java.net.URLConnection?

Example code:
URL url = new URL("RQM URL");
URLConnection urlConn = url.openConnection();

Please confirm.

Thanks & Regards,
Shiv

@khuemy,

you can construct the url like this

<baseUrl>/testcase?fields=feed/entry/content/testcase/(webId|testcaseurn:com.ibm.rqm:testplan:2
?fields=feed/entry/content/testplan/testcase/@href'])

this url will get all the testcase ids that linked to testplan urn:com.ibm.rqm:testplan:2

baseUrl:
https://<host>:<port>/ <contextRoot>/service/com.ibm.rqm.integration.service.IIntegrationService>/resources/ <projectAlias>

Hi,

Does RQM has an API to retrieve a list of test case ids (WebId) for a given test plan id?

Currently, I have to:
- GET test plan
- loop thru all test cases href in the test plan then GET each test case to retrieve its WebId.

Is there a faster way to get test case ids that are associated with the test plan?

Thanks,

permanent link
rajani guduru (1334) | answered Apr 10 '14, 7:20 a.m.
<baseURL>/testcase?fields=feed/entry/content/testcase/(*|testplan[@href='<baseURL>/testplan/urn:com.ibm.rqm:testplan:4'])  would fetch all the contents of testcases in a testplan at one shot.

For example:
https://adminib-lvp3op3.in.ibm.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/CAF/testcase?fields=feed/entry/content/testcase/(*|testplan[@href='https://adminib-lvp3op3.in.ibm.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/CAF/testplan/urn:com.ibm.rqm:testplan:4'])

where
adminib-lvp3op3.in.ibm.com is qm server;
9443: is port
CAF is project area
4 is the webId of testplan created in RQM User Interface.

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.