How to add an attachment to a test result from the command line?
CLM 4.0.4
I am using the RQM URL Utility to update Test Result attributes, but, I have no idea how to add an attachment.
Is it possible using the same tool or are there other utilities which can do the job?
Thanks,
Liora
|
Accepted answer
When we do this (although using the REST calls directly rather than using the RQMURLUtility) we take two steps:
Upload the attachment by POSTing to the attachment feed. Presumably this is what the Attachment upload example of using RQMURLUtility is doing. The result of this is a slug that identifies the attachment. We then PUT the execution result (see the artifact upload example) to include the link to the uploaded attachment. For example, we add the xml such as the following: (for some reason I am finding it hard to show all the xml in this answer - it keeps getting truncated). <ns2:executionresult> other elements <ns2:attachment href="...link to created attachment.../> </ns2:executionresult> Liora Milbaum selected this answer as the correct answer
Comments Colin, I've received by mail the full xml. Checking your suggestion.
Liora Milbaum
commented Aug 31 '14, 4:43 a.m.
Colin, How does the slug returned? The standard output doesn't specify the slug nor I can find an argument which returns it.
Thanks,
Liora
Donald Nong
commented Aug 31 '14, 11:40 p.m.
Hi Liora,
Content-Location: slug__g5G-kB7dEeScYPkGZbxYmw
Colin Thorne
commented Sep 02 '14, 12:10 p.m.
Sorry for not answering earlier (I was on vacation).
Exactly as Donald said in the previous comment, we use the Content-Location in the response header to get the slug id.
Colin.
Liora Milbaum
commented Nov 09 '14, 10:40 a.m.
Donald/Colin,
How do I retrieve the response header in case I used RQMUrlUtility to POST the attachment?
Thanks,
Liora
|
3 other answers
https://jazz.net/wiki/bin/view/Main/RQMURLUtility#UPLOAD
What artifact are you going to upload the attachments to? Comments
Liora Milbaum
commented Aug 27 '14, 4:37 a.m.
Thanks Donald,
The wiki states how do I upload an attachment but there is not relation to specific artifact.
I want the add the attachment to a specific test result which already exist.
|
Paul Slauenwhite (8.4k●1●2)
| answered Apr 05 '16, 11:57 a.m.
FORUM MODERATOR / JAZZ DEVELOPER edited Apr 05 '16, 11:58 a.m.
Please use another HTTP client/utility that supports response headers (e.g. HTTP Requester or Poster - see https://jazz.net/wiki/bin/view/Main/RqmApi#Common_Usage_Scenarios).
|
not able to get the slug id in the response for the success of the attachment??? please help Comments
Liora Milbaum
commented Dec 07 '18, 1:48 a.m.
No longer working with the tool. Can't help you. Sorry. Did you check the Content-Location response header (see https://jazz.net/wiki/bin/view/Main/RqmApi#HTTP_Responses). Also, note https://jazz.net/wiki/bin/view/Main/RqmApi#ResourcesFootnote6. |
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.