Is there any way to add an attachment in xml report?

Alexander Chako March 17, 2021

Hi! Does Xray provide any possibility to add an attachment to the execution result in XML? I can create my own implementation of a reporter, but I don't know the valid format of XML for Xray API

I think I can do something like this:

<testsuites disabled="0" errors="0" failures="0" tests="1" time="31.39">
<testsuite name="test" timestamp="2021-03-15T21:20:27" hostname="localhost" time="31.39"
errors="0" tests="1" skipped="0" disabled="0" failures="0">
<testcase classname="test" name="test"
time="15.092">
<attachments>
<attachment>
<name>screen1.png</name>
<description>hi</description>
<rawcontent>...base64...</rawcontent>
</attachment>
</attachments>
</testcase>
</testsuite>
</testsuites>

 But I don't sure what the format is valid?

1 answer

0 votes
Rogério Paiva - Xray Xporter
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 28, 2021

Hi @Alexander Chako 

It is possible depending on the report format used, and it will be necessary to convert the attached file into Base64 format.

Please check the examples in our documentation here.

If you need further help, please contact the Xray Support (http://xraysupport.xpand-it.com) so that we can request additional information and help you further.

Kind regards,
Rogério Paiva [Xray Support Team]

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events