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