It's all about the answers!

Ask a question

How to use RQMUrlUtility to list child testscripts of a given TestCase


Ken Uhl (1134) | asked Jun 11 '12, 3:21 p.m.


I am trying to use the RQMUrlUtility (RQMUrlUtil-2.0.1.1-iFix3) to identify all Test Scripts that do not have a parent Test Case.  I am not doing this through a WebInterface (rather, using a Perl script to generate the .xml and parse that into Perl constructs).  I have been successful in pulling much data from RQM, but do not see where a list of "Test Scripts" associated with a given Test Case (through the test case's passed in URL) is immediately accessible.  I believe this is because in the RQM GUI, one must actually "expose" the Test Scripts section to see the associated Test Script URLs.

 

I think what I need to do is emulate opening the "Test Scripts" section of a given Test Plan, but not sure how you direct the RQMUrlUtility to fetch that list.   Has anyone tried anything like this before, or can lead me in the right direction?

 

Thanks.

-Ken

5 answers



permanent link
Chong Yuan Yin (7612) | answered Jun 11 '12, 9:51 p.m.
JAZZ DEVELOPER
Hi Ken,

if you use RQMUrlUtility to GET a testcase, is there a property like <testscript href="..."/> in the result xml?

for command usage of RQMUrlUtility, please refer to https://jazz.net/wiki/bin/view/Main/RQMURLUtility

permanent link
Paul Slauenwhite (8.4k12) | answered Jun 12 '12, 2:31 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
The testcase resource contains URL(s) referencing the testscript resource(s).  For more information, see https://jazz.net/products/rational-quality-manager/api-doc-2.0/api-files/schemas/qm_xsd/elements/testcase_1.html#r23.

If you plan to move to RQM 3.0.1.x, you could use the fields request parameter to solve the problem with one GET request (see https://jazz.net/wiki/bin/view/Main/RqmApi#fields).

Comments
Ken Uhl commented Jun 13 '12, 3:22 p.m.

Thank you both for you comments and link to the API specs. I did find the "testscript href" reference, although I was only finding one instance of it (when the Test Case has multiple scripts associated). I will have to recheck my parsing code -- might be doing something wrong there. What I could not find, however, was a "backlink" back to the parent TestCase. This would actually more directly solve my problem as I could pull each TestScript that I was interested in, and determine if it had a link back to it's parent (rather than cross reference each Test Case with its list of children).


permanent link
Paul Slauenwhite (8.4k12) | answered Jun 14 '12, 6:58 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
There is no association from test script to test case.  Hence the need for the fields request parameter.

Comments
Ken Uhl commented Jun 15 '12, 1:44 p.m.

Interesting. But in the actual RQM GUI while in a test script, there is a box (upper right) entitled "Parent Test Case(s)" that lists the parents which you can click to navigate directly to the parent test case. I would have thought that would be just another link within the testscript page?


permanent link
Paul Slauenwhite (8.4k12) | answered Jun 15 '12, 2:12 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
No, that's a query of all the test cases referencing that test script.

Comments
Ken Uhl commented Jun 20 '12, 1:47 p.m.

Paul, thanks again -- very helpful. I was just wondering if there's an efficient way to run that query from the API? As it stands, it seems I need to pull the feed for all test cases, then pull a feed for each returned test case link to get another list of links (not names) of all testscripts, then pull another feed for each testscript to get it's actual name to report. Unfortunately my server is underconfigured and this report becomes slow and resource intensive. Is there a better way than what I have described? Thanks again.


permanent link
Paul Slauenwhite (8.4k12) | answered Jun 22 '12, 7:55 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
Yes, you can use the fields request parameter, but it requires RQM 3.0.1+.

Comments
Ken Uhl commented Jun 22 '12, 10:34 a.m.

Perfect! (Now to get them to 3.0... err 4.0!). Thanks for all your assistance. -Ken

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.