【发布时间】:2021-11-02 11:32:03
【问题描述】:
我正在尝试将 xml 报告导入到 Jira xRay - 到测试执行项。
我可以找到的文档引用了 client_id 和 client_secret,它们应该由 Create API key 生成。创建 API 密钥只会生成一个字符串,一个令牌。
因此,我无法弄清楚如何仅使用令牌来提交 xml 报告。
例如这个命令:
curl -H "Content-Type: application/json" -X POST --data @"cloud_auth.json" https://xray.cloud.getxray.app/api/v2/authenticate
我不能使用它,因为它需要 client_id 和 client_secret。此外,端点本身返回
Cannot GET /api/v2/authenticate
.
使用这个命令:
curl -H "Content-Type: text/xml" -X POST -H "Authorization: Bearer $token" --data @"data.xml" https://xray.cloud.getxray.app/api/v1/import/execution/junit?testExecKey=XNP-23
导致 "{"error":"Invalid JWT: JsonWebTokenError: jwt malformed"}"
.
有人可以帮忙吗?
【问题讨论】: