It's all about the answers!

Ask a question

How can we find the Testplan name of the currently executing test script ? USING RQM REST API


Dev K (512833) | asked Oct 28 '13, 5:46 a.m.
retagged Oct 28 '13, 6:23 a.m. by Sunil Kumar R (1.1k13344)
Hi ,
we want to know about the currently executing test script's test plan name  using RQM API?
what are the parameters/information needed for the same ?

Thanks
Regards,
Dev

Accepted answer


permanent link
Paul Slauenwhite (8.4k12) | answered Oct 28 '13, 8:52 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
Yes, the TCER (or executionworkitem) contains the reference to the test plan:

https://jazz.net/products/rational-quality-manager/api-doc-4.0.4/schemas/qm_xsd/elements/executionworkitem.html#a35

However, you have to know the ID of the TCER (or executionworkitem).
Dev K selected this answer as the correct answer

Comments
Dev K commented Nov 06 '13, 6:56 a.m.

Hi Paul,
At the time of submission of a test case, we cant find TCER Id ..and TCER name can be duplicate so is it impossible to get testplan name with information we have at  the time of submission of a Testcase?

Thanks,
Best Regards,
Dev Kashyap.


Paul Slauenwhite commented Nov 06 '13, 7:02 a.m.
FORUM MODERATOR / JAZZ DEVELOPER

The test case can be associated to one or more test plans.  You can find the test plan(s) associated to a test case by using the fields filtering (see https://jazz.net/wiki/bin/view/Main/RqmApi#FieldsExamples):

<feedUrl>?fields=feed/entry/content/testplan/(*|testcase[@href=' <resourceUrl>'])


Dev K commented Nov 06 '13, 7:06 a.m. | edited Nov 06 '13, 7:09 a.m.

Yeah , i tried this approach also .. and its working fine  . but it  can return multiple testplans as at the time of execution a test case  associate with only one test plan. and my requirement is to get only that testplan.

Please correct me if i am wrong.

Thanks,
Dev


1
Paul Slauenwhite commented Nov 06 '13, 7:20 a.m.
FORUM MODERATOR / JAZZ DEVELOPER

The only way to determine the test plan at the time of execution is to resolve the test plan associated with the TCER.


Dev K commented Nov 07 '13, 12:21 a.m.

Hi Paul,

"resolve the test plan associated with the TCER" is it mean to get all the TestPlan associate with a testcase  using
<feedUrl>?fields=feed/entry/content/testplan/(*|testcase[@href=' <resourceUrl>'])

and then filter the results according to the TCER name ?

Thanks,
Dev


Paul Slauenwhite commented Nov 07 '13, 6:18 a.m.
FORUM MODERATOR / JAZZ DEVELOPER

No, the TCER (or executionworkitem) contains the reference to the test plan:

https://jazz.net/products/rational-quality-manager/api-doc-4.0.4/schemas/qm_xsd/elements/executionworkitem.html#a35

However, you have to know the ID of the TCER (or executionworkitem).

showing 5 of 6 show 1 more comments

3 other answers



permanent link
Paul Slauenwhite (8.4k12) | answered Oct 28 '13, 7:46 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
Hi Dev,

There is no direct association between test scripts and test plans.  However, you can resolve the test case associated with the test script using the fields request parameter (see https://jazz.net/wiki/bin/view/Main/RqmApi#fields) and then the test plan associated with the test case.



Comments
Dev K commented Oct 28 '13, 8:34 a.m.

Hi Paul,

There are some test cases which exists in multiple test plans. But we need exact test plan name associate with the test case. Is it possible to do with Test execution record(TER)  ? if yes ,then how.? pls suggest.

Thanks,
Dev.


permanent link
Dev K (512833) | answered Oct 29 '13, 1:01 a.m.
Hi Paul,

Thanks for your comment.
Our requirement is to get the test plan name of a script we are going to execute in RQM.i have tried with  other approaches but they are showing multiple testplans  as a testcase can  exists in multiple testplans and our requirement is to get the exact testplan associate with that script.

Is it possible to get the test execution records (TER) using   TER name ? After getting TER object i can fetch the test plan information from it.



Best Regards,
Dev.

Comments
1
Paul Slauenwhite commented Oct 29 '13, 6:34 a.m.
FORUM MODERATOR / JAZZ DEVELOPER

Hi Dev,

Yes, you can get the TCER(s) using a fields filter on the title property.  However, titles (or names) are not unique so you may find multiple TCERs with the same title property.

To determine the test plan for a test script, you need to know the ID of the TCER (or executionworkitem).


permanent link
Dev K (512833) | answered Oct 29 '13, 6:53 a.m.
Hi Paul ,

how can we get TCER id using RQM REST API ?

Thanks,
Dev Kashyap.

Comments
Paul Slauenwhite commented Oct 29 '13, 7:02 a.m.
FORUM MODERATOR / JAZZ DEVELOPER

You can either:

1) GET https://<host>:<port>/<context root>/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project area alias>/executionworkitem/<executionworkitem ID>?abbreviate=false

2) GET https://<host>:<port>/<context root>/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project area alias>/executionworkitem?fields=feed/entry/content/executionworkitem<filter>

I would suggest create a simple set of test artifacts (test plan/case/script/execution record/execution result) and experiment with the RQM Reportable REST API to resolve the test plan from the TCER (or executionworkitem).

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.