It's all about the answers!

Ask a question

Bulk download attachments from RQM Test Case Results

Venkatesh Prasad (21922) | asked Dec 13 '19, 5:04 a.m.
Hello All,
Can anyone guide me on how to download attachments from Test Steps of a Test Case Result which the testers would have attached when a test step fails.
At the moment, I have downloaded the Test Case Results in the XML format using REST APIs and I have parsed the text based fields using Python. But, I am having problems extracting the Attachments which are attached to the Test Steps. Through REST APIs I even was able to successfully get the integration links of the attachments using REST APIs and it works if I enter the attachment links in the browser one by one (it downloads the attachments in the downloads folder), but when I download these attachments through wget programmatically, its downloading some unreadable file (its not jpg, not zip, not archive or any other format, its some junk file)
Not sure if this is the right method I am following to extract attachments.
For RTC, we have WorkItem Command Line tool to extract attachments in a nice way. Similarly, is there anything for RQM?
Please help.
Venkatesh Prasad

2 answers

permanent link
Pragya Trivedi (111) | answered Mar 23 '22, 5:06 a.m.
edited Mar 23 '22, 5:07 a.m.

Hello Venkatesh,

I am facing the same issue, I am able to get the urls for all the attachments in RQM test cases which when hit via browser downloads the file, but when I do the Get call on them the files downloaded are unreadable.

Could you please suggest if you got any solution for this?

David Honey commented Mar 23 '22, 5:43 a.m.

Please ask your own new question rather than resurrect a 2+ year old question. Please refer to the forum etiquette.

permanent link
Bharath Rao (915240) | answered Dec 16 '19, 6:12 a.m.

 Hi Venkatesh,

You could try using the RQMURLUtility to download the attachments from RQM project area or specifically from a test artifact.

Hope it helps

Please mark the question as answered or let me know if you have more questions.


Venkatesh Prasad commented Dec 19 '19, 4:47 a.m.
Hello Bharath,
Thats exactly what I did. I used RQMURLUtility which is nothing but a utility using REST calls.
As mentioned in my question, I was able to get the attachment links aswell. But now, I need to know how to bulk download the attachments with the available attachment links. Each link is having one attachment. Like wise, there are thousands of links.
I got to know about wget but its not working.

Venkatesh Prasad

Bharath Rao commented Dec 23 '19, 12:32 a.m. | edited Dec 23 '19, 12:32 a.m.

 Hi Venkatesh,

As mentioned in the RQMURLUtility wiki article, you can use the attachment links obtained to perform another GET call on the attachment links to get the artifact.

The same call has to be repeated for all the links to download all the attachments.

Hope it helps!

java -jar RQMUrlUtility.jar -command GET -user <user> -password <pass> -filepath ./dls/ -url https://<host>:<port>/qm/service/<project alias>/attachment/<ID>

<style type="text/css"> p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000} span.s1 {font-variant-ligatures: no-common-ligatures} </style>

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.