Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

0 votes


Accepted answer

Permanent link
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

1 vote

Comments

Colin, I've received by mail the full xml. Checking your suggestion. 

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

Hi Liora,
The slug Id is randomly generated and returned in the response headers, as mentioned in this article.
https://jazz.net/library/article/1376
You can also check out my answer in the bottom of this post where I showed the sequence of creating a test plan.
https://jazz.net/forum/questions/160205/cant-get-a-testplan-modified-by-put-via-poster/160421

Content-Location: slug__g5G-kB7dEeScYPkGZbxYmw

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.

Donald/Colin,


How do I retrieve the response header in case I used RQMUrlUtility to POST the attachment?

Thanks,
Liora 


3 other answers

Permanent link
https://jazz.net/wiki/bin/view/Main/RQMURLUtility#UPLOAD
What artifact are you going to upload the attachments to?

1 vote

Comments

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.


Permanent link
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).

0 votes


Permanent link

 not able to get the slug id in the response for the success of the attachment??? please help

0 votes

Comments

No longer working with the tool. Can't help you. Sorry. 

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 11,098

Question asked: Aug 26 '14, 10:04 a.m.

Question was seen: 8,309 times

Last updated: Dec 07 '18, 8:57 a.m.

Confirmation Cancel Confirm