How to add attachments and external links to execution result via REST API / RQMUrlUtility
Hi,
I can successfully create test execution result artifacts via RQMUrlUtlity PUT request and self-created XML (from scratch). I want to add a link to an external web-site to the execution result so I added according tags to the created xml (tried tags "attachment" and "contribution" with "href" attribute) but it is just ignored - when I review the result on the Web-GUI no links (attachments) show up in the Result Details section. However, when execution results are created via Commandline Adapter the same links do show up. Can anybody tell what's I am doing wrong? RQM version is 6.0.2 Thanks! |
Accepted answer
OK, so this is what I have been able to figure out:
1. The attachment property is not the one you want to use. The REST API will reject any links that are not actually attachments (i.e. links to QM's attachment service).
2. I was able to update the contribution attribute. On a second read of the documentation I realized that the contribution attribute is not READ ONLY. It was actually the "href" and "name" attributes of a contribution that are READ ONLY. This means that after adding a contribution, you can't, for example, rename it. Just keep in mind that "name" is also required. I was able to add the below element to my execution result XML successfully.
<qm:contribution name="foobar" href="https://foobar.com/helloWorld"/>
3. Now some bad news. The "contributor" property is not exposed in the web client's UI. I'm not entirely clear on the details, but it looks like this property was added to execution result to facilitate an integration with RPT. So, as I described above, you can add arbitrary links to an execution result, but you won't be able to see them in the web UI.
The only other option that I see is that you could put your links into the Result Details rich text section of the execution result. If that won't work for you, then I think I'd go back to my original suggestion which is to open an enhancement detailing your use case for us to consider in a future release.
Frank Lautenbach selected this answer as the correct answer
Comments
Frank Lautenbach
commented Jul 19 '16, 11:57 a.m.
Hi Michael,
|
One other answer
Unfortunately, it looks like those two attributes are "read only" as documented here:
https://jazz.net/products/rational-quality-manager/api-doc-6.0.2/schemas/qm_xsd/elements/attachment_4.html
https://jazz.net/products/rational-quality-manager/api-doc-6.0.2/schemas/qm_xsd/elements/contribution.html
So, you aren't going to be able to change them. If you need to be able to write these attributes you'll have to open an enhancement request with the details of your use case for us to consider.
Comments
Frank Lautenbach
commented Jul 14 '16, 11:19 a.m.
Hi Michael,
Michael Triantafelow
commented Jul 14 '16, 12:40 p.m.
Good question. I took a look at the code for the command-line adapter and it is using some private APIs to do those things.
That said, I also took a look at the execution result REST API code and despite what the documentation says, it looks to me like it should be possible to write to those attributes. I'll need to look into this in more detail. Stay tuned.
|
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.