It's all about the answers!

Ask a question

RQM: Need to download all attachments related to a Test Case Result


w h (191824) | asked Aug 27 '15, 3:31 p.m.
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


Comments
Donald Nong commented 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 commented 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).  


The new URL is:<Server name>/qm/web/console/<PA Name>#action=com.ibm.rqm.planning.home.actionDispatcher&subAction=viewResult&resultItemId=<_23Qy...etc>

Accepted answer


permanent link
Brian Fleming (1.6k11928) | answered Sep 01 '15, 11:56 a.m.
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
w h selected this answer as the correct answer

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.