我正在尝试获取有关 Jira 测试执行测试的数据,例如:摘要、受让人、类型、状态和前置条件(要精确的摘要)。问题是我无法获取前置条件的数据。当然,我可以获得前置条件的键和其他东西,但我需要摘要列。
问问题
160 次
2 回答
0
为了获取有关这些实体的详细信息,即标准 Jira 问题,您需要使用Jira 的 REST API并使用 Jira 问题密钥或 ID。
HTTP GET 请求示例:
https://sandbox.xpand-it.com/rest/api/2/issue/BOOK-36?fields=summary
回复:
{
"expand": "renderedFields,names,schema,operations,editmeta,changelog,versionedRepresentations",
"id": "20201",
"self": "https://sandbox.xpand-it.com/rest/api/2/issue/20201",
"key": "BOOK-36",
"fields": {
"summary": "Manual test of strong password validation"
}
}
于 2020-08-11T09:30:24.913 回答
0
假设您指的是使用 Jira Xray 进行测试管理,下面的 rest api 将有助于获取给定前提条件的所有详细信息。
休息网址: GET /rest/raven/1.0/api/precondition/{preConditionKey}/test
示例响应:
[{
key: "TEST-1",
self: "http://localhost:6080/rest/api/2/issue/19701",
reporter: "admin",
precondition: [{
preconditionKey: "TEST-4",
self: "http://localhost:6080/rest/api/2/issue/19705",
reporter: "admin",
type: "Cucumber"
}],
type: "Cucumber"
}, {
key: "TEST-2",
self: "http://localhost:6080/rest/api/2/issue/19701",
reporter: "admin",
precondition: [{
preconditionKey: "TEST-4",
self: "http://localhost:6080/rest/api/2/issue/19705",
reporter: "admin",
type: "Cucumber"
}],
type: "Cucumber"
}]
Jira XRAY Api 文档链接:https ://docs.getxray.app/display/XRAY/Pre-Conditions+-+REST
于 2021-05-12T20:48:05.883 回答