Home > Mobile >  Jira XRAY result are not updated after importing json formatted result file
Jira XRAY result are not updated after importing json formatted result file

Time:04-28

We are manually trying to import test execution result in json format to xray Jira. Our test cases are of manual type with steps but we would like to mark complete test cases Pass or Fail not for each step. For this we created manually json file for single test cases in test execution. After importing from UI by "Xray-Import execution result" no failure on API under network tab but result is not updated to status Pass.

Below is the Json we created from xray official documents.

{ "testExecutionKey": "XXXX", "tests": [ { "testKey": "XXXXX", "start": "2022-04-27T15:43:35 01:00", "finish": "2022-04-27T15:45:56 01:00", "comment": "Successful execution", "status": "PASS" } ] }

Could any one plz help us with correct json format which is accepted by xray and what's mistake in above json.

Working Json:

{ "testExecutionKey": "XXXX", "tests": [ { "testKey": "XXXXX", "start": "2022-04-27T15:43:35 01:00", "finish": "2022-04-27T15:45:56 01:00", "comment": "Successful execution", "status": "PASSED" } ] }

CodePudding user response:

The format of Xray Json on Xray cloud os slightly different from Xray server/DC. The format you shared seems to be from Xray server. Please use this doc link instead: https://docs.getxray.app/display/XRAYCLOUD/Import Execution Results - REST v2#ImportExecutionResultsRESTv2-XrayJSONresults

On the format you shared, please change PASS to PASSED. To submit it by the rest api, you need to make an authentication request first using the client ID and client secret of your API key managed on Xray global settings. Then you can do the POST request to the Xray Json endpoint passing the authentication token plus the Xray json body.

  • Related