I am trying to get data about tests of a Jira test execution such as : Summary, assignee, type, status and pre-conditions (the summary to be precised). The problem is I can't get the pre-condition's data. Of course I can get the pre-condition's key and other stuff but I need the summary column.
Asked
Active
Viewed 414 times
2 Answers
0
In order to obtain details about those entities, which are standard Jira issues, you need to use Jira's REST API and use the Jira issue key or id.
Example of HTTP GET request:
https://sandbox.xpand-it.com/rest/api/2/issue/BOOK-36?fields=summary
Response:
{
"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"
}
}

Sérgio
- 1,777
- 2
- 10
- 12
0
Assuming you are referring to test management with Jira Xray, following rest api will help in getting all the details for a given pre-condition.
Rest URL: GET /rest/raven/1.0/api/precondition/{preConditionKey}/test
Sample Response:
[{
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 documentation Link: https://docs.getxray.app/display/XRAY/Pre-Conditions+-+REST

Vishal Kharde
- 1,553
- 3
- 16
- 34