It's all about the answers!

Ask a question

Why the Test cases created using RQM Excel Import Utility don't have Test Script ID in the XML Feed ?


Prasun Roy (1673813) | asked Dec 17 '12, 8:54 a.m.
 We are using REST API to get the XML feed for Test cases in RQM, then perform some logic and post the new XML back to RQM. We are interested in the <testscript> tag in the Test case XML, this has the link to the associated Test script. The link ends with the WebID or SlugID of the Test Script. Everything works as expected if the Test Case and Test Script is created in RQM and then associated. But if we import the Test Case and associated Test script using the RQM excel import utility then the <testscript> tag no longer has the link to associated Test script instead it ends like "/testscripts/<Name_Of_Test_Case>". Somehow RQM is able to figure out which Test script is linked to the test case, but we have no idea just by looking at the XML. 

We had set up the configuration file so that the Test case and Test script names are different, so we have no way to figure out which test script is linked to the Test case. I am attaching a screenshot of the configuration file, appreciate any help in this matter.

RQM Excel Import Config

Accepted answer


permanent link
Pramod Chandoria (2.1k11120) | answered Dec 17 '12, 12:41 p.m.
JAZZ DEVELOPER
Hi Prasun,
RQM identities each artifact uniquely by an integer web Id for each artifact type like test case , test script
It ranges from 1,2,3....so on
To expose such artifacts through REST API, RQM uses a combination of IRI prefix and web Id to generate a unique external ID for each artifact
e.g.  urn:com.ibm.rqm:testcase:4367
Here 4367 is web id of the testcase and corresponding externalId is urn:com.ibm.rqm:testcase:4367
so if you do GET on ...\testcase\urn:com.ibm.rqm:testcase:4367 , it will always return a xml for this testcase

However there is one more way to define externalId for the artifact. This is possible only when you create new artifact using REST API for PUT and POST.
e.g. If you create new test case using PUT ...\testcase\mytestcase
A new testcase will be created with external id mytestcase
Now for such aftifact you can use two diiferent url to get it
GET ...\testcase\urn:com.ibm.rqm:testcase:43 (Assuming 43 is the id assigned to the testcase)
GET ..\testcase\mytestcase
The externalId concept is useful if you are say creating first a test script and then testcase and want to link testcase with test script, as a external client you know the externalID when script was created so you can easily use that URL to refer it in Testcase XML.

In your case
.../testscripts/name_of_test_case
I think excel tool is using name of the testcase as external Id for the script

Note that external Id can be any valid string and no two artifacts of same type can have same external id



Prasun Roy selected this answer as the correct answer

Your answer


Register or to post your answer.