简体   繁体   English

导入 json 格式的结果文件后,Jira XRAY 结果未更新

[英]Jira XRAY result are not updated after importing json formatted result file

We are manually trying to import test execution result in json format to xray Jira.我们正在手动尝试将 json 格式的测试执行结果导入 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.为此,我们为测试执行中的单个测试用例手动创建了 json 文件。 After importing from UI by "Xray-Import execution result" no failure on API under.network tab but result is not updated to status Pass.通过“Xray-Import 执行结果”从 UI 导入后,网络选项卡下的 API 没有失败,但结果未更新为状态通过。

Below is the Json we created from xray official documents.下面是我们根据xray官方文档创建的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": "PASS" } ] } { "testExecutionKey": "XXXX", "tests": [ { "testKey": "XXXXX", "start": "2022-04-27T15:43:35+01:00", "finish": "2022- 04-27T15:45:56+01:00", "comment": "成功执行", "status": "PASS" } ] }

Could any one plz help us with correct json format which is accepted by xray and what's mistake in above json.任何人都可以帮助我们纠正 xray 接受的 json 格式以及上面的 json 有什么错误。

Working Json:工作 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" } ] } { "testExecutionKey": "XXXX", "tests": [ { "testKey": "XXXXX", "start": "2022-04-27T15:43:35+01:00", "finish": "2022- 04-27T15:45:56+01:00", "comment": "成功执行", "status": "PASSED" } ] }

The format of Xray Json on Xray cloud os slightly different from Xray server/DC. Xray 云操作系统上 Xray Json 的格式与 Xray 服务器/DC 略有不同。 The format you shared seems to be from Xray server.您共享的格式似乎来自 Xray 服务器。 Please use this doc link instead: https://docs.getxray.app/display/XRAYCLOUD/Import+Execution+Results+-+REST+v2#ImportExecutionResultsRESTv2-XrayJSONresults请改用此文档链接: https://docs.getxray.app/display/XRAYCLOUD/Import+Execution+Results+-+REST+v2#ImportExecutionResultsRESTv2-XrayJSONresults

On the format you shared, please change PASS to PASSED.在您分享的格式上,请将 PASS 更改为 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.要通过 rest api 提交,您需要先使用在 Xray 全局设置上管理的 API 密钥的客户端 ID 和客户端密码进行身份验证请求。 Then you can do the POST request to the Xray Json endpoint passing the authentication token plus the Xray json body.然后,您可以向 Xray Json 端点发出 POST 请求,传递身份验证令牌和 Xray json 正文。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM