We are currently evaluating XRay JIRA plugin for Test management. I have got the REST API working by using the documentation here http://confluence.xpand-it.com/display/XRAY/REST+API
As part of our automated test runs screen shots are taken for failed tests.We would like to upload attachments as evidence for test executions.
How can we upload these attachments for a test execution using REST API?
Community moderators have prevented the ability to post new answers.
Hi Gaurav,
to attach evidences, you have to use the "evidences" field and use base64 for the image.
You can see my example below
{ "info" : { "summary" : "Summary of TEst execution", "description" : "This execution is automatically created when importing execution results from an external source", "user" : "admin", "revision" : "1.0.42134", "startDate" : "2014-08-30T11:47:35+01:00", "finishDate" : "2014-08-30T11:53:00+01:00" }, "tests" : [ { "testKey" : "PPM-1", "start" : "2014-08-30T11:51:00+01:00", "finish" : "2014-08-30T11:52:30+01:00", "comment" : "Execution failed. Example #5 FAIL.", "status" : "FAIL", "evidences" : [ { "data": "iVBORw0KGgoAAAANSUhEUgAABkIAAAO9CAYAAADezXv6AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEn(rest of base64 image enconding)", "filename": "image21.jpg", "contentType": "image/jpeg" } ], "examples" : [ "PASS", "PASS", "PASS", "PASS", "FAIL" ], "steps": [ { "status": "PASS", "comment": "Coment on Test Step Result *1*", "evidences" : [ { "data": "iVBORw0KGgoAAAANSUhEUgAABkIAAAO9CAYAAADezXv6AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEn(rest of base64 image enconding)"," "filename": "image21.jpg", "contentType": "image/jpeg" } ] } ] } ] }
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried the above but didn't work for me. Getting HTTP 500 error. Please let me know what exactly to be provided for "data".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Could you please open a support ticket providing the your Jira logs and the output returned by the server? This way you'll get a faster answer to this question.
Best regards,
Xpand Add-ons Team
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
yes opened the support ticket - XRAYSUPPORT-3523 . Please provide suggestions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.