RQM: Need to download all attachments related to a Test Case Result
When I export Test Case Results, I get PDF files that display the link to the attachment link. When I paste that attachment link into the browser, the attachment will automatically download.
I'd like to use a similar API call in the browser, passing the Test Case Result ID and get either the list of attachments ID's associated with that Test Case Result to then pop into the browser and download, or a call that will download all the attachments into the browser that are related to that Test Case Result.
I can use <server>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<PA name>/executionresult/urn:com.ibm.rqm:executionresult:517 and it will display the correct TC result, but using flags like ?fields=executionresult/attachment do not get me the list of attachments or attachment. I've tried to do this in Poster but not getting useful information.
Thanks
Accepted answer
The xml path for attachments is
/feed/entry/content/executionresult/stepResults/stepResult/stepAttachment
However, according to the API doc (https://jazz.net/wiki/bin/view/Main/RqmApi#SupportedFieldsResources) you can only select as deep as stepResults with the fields parameter. Also note that filtering by id is not supported for the executionresult object when using the fields parameter. The best I think you could do is a query like this, using the title of the execution result to filter:
https://<server>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<PA Name>/executionresult?strictFields=true&fields=feed/entry/content/executionresult[title='Donors will receive confirmation and receipt_Firefox_DB2_WAS_Windows']/stepResults
/feed/entry/content/executionresult/stepResults/stepResult/stepAttachment
However, according to the API doc (https://jazz.net/wiki/bin/view/Main/RqmApi#SupportedFieldsResources) you can only select as deep as stepResults with the fields parameter. Also note that filtering by id is not supported for the executionresult object when using the fields parameter. The best I think you could do is a query like this, using the title of the execution result to filter:
https://<server>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<PA Name>/executionresult?strictFields=true&fields=feed/entry/content/executionresult[title='Donors will receive confirmation and receipt_Firefox_DB2_WAS_Windows']/stepResults
Comments
Donald Nong
Aug 28 '15, 1:56 a.m.When the first URL displays "the correct TC result", do you see the link to the attachment? If so, what does it look like?
w h
Aug 28 '15, 8:54 a.m.The browser redirects to the GUI page and displays the Test Result with the Test Script steps and Actual Results. Each of these Actual Results / Steps we'll have 1 to many attachments (screenshots).