Hey Community ,
I am trying to send back to my Test , a sample Test-Execution results ,
I have this command which i copied and altered from the guide:
curl -v -H "Content-Type: application/json" -X POST -H "Authorization: Bearer ${token}" --data @"/home/arbe/temp/xray/data2.json" "https://xray.cloud.getxray.app/api/v2/import/execution/"
the output (the bottom line not all the verbose output ) :
* Connection #0 to host xray.cloud.getxray.app left intact
{"error":"Result is not valid Xray Format"}
( The Token passed successfully )
the Json :
{
"info" : {
"summary" : "Test X-ray",
"description" : "Test X-ray",
"version" : "v1.0",
"user" : "########(privacy reasons)",
"revision" : "1",
"startDate" : "2022-04-22T16:30:35+01:00",
"finishDate" : "2022-04-22T16:53:00+01:00",
"testPlanKey" : "ARBE-264",
"testEnvironments": ["Windows", "Linux"]
},
"tests" : [
{
"testKey" : "ARBE-277",
"start" : "2022-04-22T16:30:35+01:00",
"finish" : "2022-04-22T16:53:00+01:00",
"actualResult" : "Successful execution",
"status" : "PASSED"
}
]
}
I just want to see that this function works , so i can implement a gitlab repo with the code to run the test , and upload back a TE with a pass/fail
Thanks
Hi @Saar levi - welcome to the Atlassian Community,
Which test framework are you using or how is the JSON generated??
Did you check the documentation regarding this topic:
https://docs.getxray.app/plugins/servlet/mobile?contentId=62271187#ImportExecutionResults-XrayJSONformat
In general this should work but there is a specific JSON format that is accepted by XRAY. (personally I used the xml import —> sub test execution is created from github action and automatically filled with test results, both via API).
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.