[英]How to import json report through automation using REST API and XRay for JIRA and Cucumber + Xray
请注意,您显示的 curl 请求是为 Jira 服务器上的 Xray 量身定制的,从您显示的屏幕截图来看,您似乎在 Jira Cloud 上使用 Xray。 这要求您有一个令牌,您首先需要使用另一个请求来获取该令牌。 如果您是通过“手动”(即从命令行)进行操作,则需要执行以下操作:
token=$(curl -H "Content-Type: application/json" -X POST --data @"cloud_auth.json" https://xray.cloud.xpand-it.com/api/v2/authenticate| tr -d '"')
curl -H "Content-Type: application/json" -X POST -H "Authorization: Bearer $token" --data @"report.json" https://xray.cloud.xpand-it.com/api/v2/import/execution/cucumber
我的 cloud_auth.json 是这样的:
{ "client_id": "215FFD69....","client_secret": "1c00f8f2c..." }
请详细查看云中的认证API和导入cucumber结果的端点(实际上有两个)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.