Steps are not imported when Importing execution results using xray json format

varun May 13, 2021

Im using robot framework to automate my test cases. Once test cases are executed, im uploading the results in output.xml using xray's api in the below link.

https://docs.getxray.app/display/XRAY/Import+Execution+Results++REST#ImportExecutionResultsREST-RobotFrameworkXMLresults

 

However the main issue with this api is i wont be able to upload screenshots. To overcome this, Im using xray json format api in the below link.

https://docs.getxray.app/display/XRAY/Import+Execution+Results++REST#ImportExecutionResultsREST-XrayJSONresults

Although this api allows me to upload screenshots, it is deleting the steps that have been uploaded using the xml results api.

My payload looks like this

{
"info": {
"description": "TS01 GetRequest",
"startDate": "2021-05-13T16:30:33+05:30",
"finishDate": "2021-05-13T16:30:35+05:30"
},
"tests": [
{
"testKey": "xyz-313",
"start": "2021-05-13T16:30:33+05:30",
"steps": [
{
"comment": "Reads test data for your test case by searching for key\nwith test case name in all variable files passed in command line\nwhile execution.",
"status": "PASS"
}
],
"finish": "2021-05-13T16:30:35+05:30",
"status": "PASS"
},
{
"testKey": "xyz-306",
"start": "2021-05-13T16:30:35+05:30",
"steps": [
{
"comment": "Create Session: create a HTTP session to a server",
"status": "PASS"
}
],
"testExecutionKey": "xyz-314"
}

 

Can you please help me with this?

Below are the things i would like to see once results are pushed to jira

1) If tests are not present, test should be created 

2) execution issue should be created containing all the tests executed in that run

3) each test in that execution should contain all steps as well as the screenshots uploaded

Thanks

Varun Dunga

1 answer

1 accepted

0 votes
Answer accepted
Sergio Freire - Xblend
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.
May 17, 2021

Hi, 

it seems that you're using Xray on Jira Cloud but you shared links to the documentation of Xray server/datacenter, which although similar is a different product.

The proper Xray Cloud documentation is this one.

Some relevant notes, if you use the Robot Framework XML (e.g. output.xml) report:

  • Xray Cloud will supports attachments in keywords in a couple of weeks, you use the SeleniumLibrary (or the more recent Browser library). This will be part of the release that will provide test parameters
  • Xray server doesn't yet support attachments in keywords (there's an issue in the backlog for it, please contact the support and vote on it.

 

You cannot use Xray JSON format for that purpose, as it will only allow you to report the overall status of the test... and the Test must exist beforehand. You cannot yet report statuses for individual keywords, if you use this format.

Regards,

Sérgio Freire

Suggest an answer

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

Atlassian Community Events