Uploading Attachments for RQM Automation Result through OSLC
![]()
Hello,
I have written a few questions along my journey creating an RQM Automation Adapter from scratch. I have finally created an adapter that is able to handle Automation Requests and post the result back to the system. I now have to attach the actual test system results to the object as explained in Step 30 in the API Reference. https://jazz.net/wiki/bin/view/Main/RQMTestAutomationAdapterAPI The uploadAttachmentUrl property is clearly there in the Automation Request object. If I run a GET request on the URI, I receive a list of attachments in the system: <?xml version="1.0" encoding="UTF-8"?> <feed xmlns="http://www.w3.org/2005/Atom"> <title type="text">attachment ATOM feed for project area ...</title> <id>https://server:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Project/attachment</id>I can also send a POST request to the address with a multipart/form-data request with my file included. Headers: Content-Type: multipart/form-data Accept: */*This appears to work at first glance: I receive a 201: Created HTTP response with a 'location' header ('https://server:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Project/attachment/slug__yAG_tVzpEeOFGtOkGKTDbw'). However, the new attachment does not appear in the list of attachments if I run another GET on the base address. I thought that perhaps it is a special class of attachment that wouldn't show up in the base query, so I have tried adding an
rqm_auto:attachment
triple to the URI provided by the in the location header anyways. This does not cause an error in the Automation Result Creation Factory POST, but when I run a GET on the created Automation Result, there is no attachment property included.
There are no 3xx or 4xx Responses in the entire sequence, however the attachment does not end up in the attachment list or in the desired Automation Result. How can I get my test results attached to the final Automation Result Resource? Regards, Elliot |
Accepted answer
2 other answers
![]()
Hi Elliot,
By any chance have you looked at how the Eclipse Lyo sample adapter works to upload the attachments?
http://wiki.eclipse.org/Lyo/BuildClient#RQMAutomationSample
The sample adapter runs a test and at the end uploads a sample file to the result. This sample file is visible in the RQM's result UI. Here is a UI screenshot on how the attachment appears here
![]()
In eclipse Lyo sample, look for the comment
// Upload an attachment for the result in RQMAutomationSample.java
Hope this helps
Vaibhav
|
![]()
Not all OSLC properties are exposed in the RQM UI since OSLC is an open standard that defines resources and their properties that are not required/supported by RQM.
|
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.