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

REST API - show last execution result for Test Cases in a Test Plan

Possible?
I'm struggling with the XML and URI bits.
I know how to get the Test Cases from a Test Plan (4 in this instance)
<feedUrl>testplan/urn:com.ibm.rqm:testplan:4


and I can scrape the Test Cases from there.
And I know how to show all the execution results with executionrecord and executionworkitem
but not how to show the last result (pass/fail) from all the Test Cases in a particular Test Plan.

I've looked through here and see all the bits I want, but not how to align the planets
examples

0 votes



3 answers

Permanent link
 https://<server>:<port>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project>/executionresult?fields=feed/entry/content/executionresult/(*|testplan[@href="<test plan resource uri>"])&sort=descending
Use "testplan[@href="resource uri"]" for filtering and "sort=descending" for sorting. The first entry in the feed is what you want.

0 votes


Permanent link
many thanks for the reply.
I've got myself a bit muddled. Apologies for the bold
I've enclosed the whole request in single quotes, as I kept getting Shell errors (due to the &" ? etc)
-url 'https://<URL>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<Project>/executionresult?fields=feed/entry/content/executionresult/(*|testplan[@href="https://<URL>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<Project>/testplan/urn:com.ibm.rqm:testplan:4""resource="" uri="//<URL>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<Project>/testcase/2122487536">"])&sort=descending '
more questions.
The fields=feed/entry/content/executionresult does what? I guessed (incorrectly)
I think I've misunderstood what the resource= and and uri= functionality
the XML I've got shows all the Test Cases in the Test Plan (4), but all I want is the last pass/fail result and when the test was last run , for each Test Case.

thanks

0 votes

Comments

You use the "fields" parameter to do filtering. Read the document carefully. A feed with sorting is the closest thing you can get as far as I know. You have to filter the feed to get what you want. The sorting should make this part a bit easier.


Permanent link
Oh , and how do I tell the utility to show all the objects when I run it, I seem to only get the first 30 or so?

thanks

0 votes

Comments

The feed is paginated, with each page displaying a predefined number of entries. Look for <link rel="next" href="..." / > for the link to the next page.

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
× 12,015

Question asked: Apr 23 '15, 1:00 a.m.

Question was seen: 4,557 times

Last updated: May 01 '15, 6:04 a.m.

Confirmation Cancel Confirm