[英]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.