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