It's all about the answers!

Ask a question

i can get list of test cases and list of test plans but how can we get test plan name using test case name?


Dev K (512833) | asked Oct 22 '13, 2:36 a.m.
edited Oct 22 '13, 2:39 a.m.
My requirement is to get test plan name using test case name using RQM REST API .can anyone please suggest me ?


Thanks,
Best regards,
Dev Kashyap.

Accepted answer


permanent link
Sunil Kumar R (1.1k13044) | answered Oct 22 '13, 4:10 a.m.
JAZZ DEVELOPER
 I dont think Test Cases stored href of Test Plans, hence it would not be possible to list Test Plan linked to Test Case using REST API. However you can use the testplan REST url to see what Test Cases it is linked to..

eg: 
https://clm:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/prjCLM/testplan
  << lists all test plans in the project area "prjCLM"

https://clm:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/prjCLM/testplan/urn:com.ibm.rqm:testplan:9
  << shows the XML view of test plan with id "9".

Here is a snapshot from RESTClient showing the test cases linked to testplan with id:9

Here

Best Regards, Sunil




Dev K selected this answer as the correct answer

One other answer



permanent link
Colin Thorne (22421619) | answered Oct 22 '13, 5:44 a.m.
I also haven't found a way to go directly from test case to test plan. In my case I had a small number of test plans and so therefore I enumerated the test plans (similar to the example above) and then queried on the test cases with a filter for each of the test plans in turn.
Then, in my client code, I searched for the test cases either by title or by id.

This is the query I used to list all the test cases for a specific test plan:

https://<server>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Example+Project/testcase?fields=feed/entry/content/testcase/(title|testplan[@href="https://<server>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Example+Project/testplan/urn:com.ibm.rqm:testplan:12"])

This query just returns the title field for all the test cases that are in test plan id 12.

Comments
Dev K commented Oct 22 '13, 6:54 a.m.

Thanks Colin for your Comment. I also tried the same with the query :


 https://URL:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/project_alias/testplan?fields=feed/entry/content/testplan/(*|testcase[@href='https://URL:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/project_alias/testcase/urn:com.ibm.rqm:testcase:X']) 

but it is returning all the test plans and there corresponding test case hrefs.
still i have not got the solution as i know only test case name and i want to know corresponding test plan name.

Please let me know if you get any solution.
Thanks,
Regards,
Dev Kashyap.

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.