executionworkitem ID in REST API
We recently upgraded to RQM 3.0.1 so that we could make better use of the REST API to integrate with Microsoft's TFS. The setup we are using is this:
Through the API a Build Record and Build Definition are updated when the build is done on TFS
This kicks off an execution schedule which runs a set of Test Cases
These steps have all been worked out fine. The problem we are having is in trying to recover the Test Case Execution Records when the tests are done running.
When I examine the data from an executionworkitem item, I can see a number of executionresult elements. However, rather than providing me with an ID I can query, I get a slug:
<currentexecutionresult>
<executionresult>
Compare this to other data returned where I get an ID (in this example a remote script):
<remotescript>
Is there an artifact that would contain an ID for the currentexecutionresult artifact?
Through the API a Build Record and Build Definition are updated when the build is done on TFS
This kicks off an execution schedule which runs a set of Test Cases
These steps have all been worked out fine. The problem we are having is in trying to recover the Test Case Execution Records when the tests are done running.
When I examine the data from an executionworkitem item, I can see a number of executionresult elements. However, rather than providing me with an ID I can query, I get a slug:
<currentexecutionresult>
<executionresult>
Compare this to other data returned where I get an ID (in this example a remote script):
<remotescript>
Is there an artifact that would contain an ID for the currentexecutionresult artifact?
5 answers
The URL of the referenced test resources is contained in the href attribute of the referring test resource property (see https://jazz.net/wiki/bin/view/Main/RqmApi#Detailed_Schema_Documentation).
Hello Paul,
Thanks for replying to this. I'm working on this problem right now.
The docs you point to sadly are like providing a hay stack and saying "there's a needle in there". :o
If I request via the REST API the Execution Work Item, I get back some nice XML. In fact I can see the "previous ID" just fine:
executionresult ref="https://server.domain.com:9443/
qm/service/com.ibm.rqm.integration.service.IIntegrationService/
resources/Quality+Manager/
executionresult/urn:com.ibm.rqm:executionresult:561"
However the current item looks like this:
currentexecutionresult
href="https://server.domain.com:9443/
qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/
Quality+Manager/executionresult/
slug__Ah-TpQVyEeGMGd5U5A4BCQ"
Can you explain WHY this make sense?
When I use that URL and watch in Fiddler, I see a ton of round trips between the client and the server.
Why couldnt you include the ID for the current item?
Cheers,
Brian
Hi Brian,
The URL for the test resource should be considered opaque. That said, the <id> can be <internal> (see https://jazz.net/wiki/bin/view/Main/RqmApi#id). Both URLs should resolve test executionresult resources when performing a GET request.
Paul thank you for your reply.
Two questions:
One:
Why does one use an ID
561
and one use a "random" string?
slug__Ah-TpQVyEeGMGd5U5A4BCQ
Two:
Am I reading your resonse correctly in that I can pass the "slug" string in a get request and have the XML data returned like it does when I pass the ID? In other words are both ID types (int vs "slug") morally equivalent?
Cheers,
Brian