How can we find the Testplan name of the currently executing test script ? USING RQM REST API
![](http://jazz.net/_images/myphoto/3e7179fe84fff946e725606d46b9889b.jpg)
Accepted answer
![](http://jazz.net/_images/myphoto/3e7179fe84fff946e725606d46b9889b.jpg)
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).
Comments
![](http://jazz.net/_images/myphoto/3e7179fe84fff946e725606d46b9889b.jpg)
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.
![](http://jazz.net/_images/myphoto/5468e22f9357bfe0556ac2247dd3c7c7.jpg)
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>'])
![](http://jazz.net/_images/myphoto/3e7179fe84fff946e725606d46b9889b.jpg)
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
![](http://jazz.net/_images/myphoto/5468e22f9357bfe0556ac2247dd3c7c7.jpg)
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
![](http://jazz.net/_images/myphoto/3e7179fe84fff946e725606d46b9889b.jpg)
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
![](http://jazz.net/_images/myphoto/5468e22f9357bfe0556ac2247dd3c7c7.jpg)
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).
3 other answers
![](http://jazz.net/_images/myphoto/3e7179fe84fff946e725606d46b9889b.jpg)
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.
![](http://jazz.net/_images/myphoto/3e7179fe84fff946e725606d46b9889b.jpg)
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
![](http://jazz.net/_images/myphoto/5468e22f9357bfe0556ac2247dd3c7c7.jpg)
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
![](http://jazz.net/_images/myphoto/3e7179fe84fff946e725606d46b9889b.jpg)
how can we get TCER id using RQM REST API ?
Thanks,
Dev Kashyap.
Comments
![](http://jazz.net/_images/myphoto/5468e22f9357bfe0556ac2247dd3c7c7.jpg)
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).