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

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

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

1 vote


Accepted answer

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

1 vote

Comments

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.

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

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

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

1 vote

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

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


1 vote

Comments

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

0 votes

Comments

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).

1 vote


Permanent link
Hi Paul ,

how can we get TCER id using RQM REST API ?

Thanks,
Dev Kashyap.

0 votes

Comments

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 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
× 10,953

Question asked: Oct 28 '13, 5:46 a.m.

Question was seen: 8,727 times

Last updated: Nov 07 '13, 6:18 a.m.

Confirmation Cancel Confirm