Page History
The Xray REST API provides the following endpoints for managing the Test Repository information of a given project.
...
Some endpoints support pagination, using the page
and limit
query parameters.
Hierarchy
- To obtain a list of all the folders associated with the Test Repository folders of a given project, including their hierarchy information, you need to specify the key of the respective project.
Expand | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||
|
...
- To obtain a list of the Tests associated with the Test Repository of a given project, you need to specify the key of project
- To obtain a list of the Tests contained within a given Test Repository folder, you need to specify its folderId, besides the project key
- To change (add/remove) Tests to a given folder, you need to specify the key of the respective project
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
|
Tests
- To view the Tests associated with a Test Execution, you need to specify the key of the Test Execution you want to view.
- To associate or remove a Test from a Test Execution, you need to send a JSON with a list of the keys. When associating, these keys can be Test keys or Test Set keys; when removing, they have to be Test keys.
- To remove a Test from a Test Execution, you need to specify the key of the Test you wish to remove.
|
Expand | |||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||
|
Folders
- To obtain or update information about a given Test Repository folder, you need to specify both the project key and the internal folder Id
- To remove a folder from the Test Repository, you need to specify both the project key and the internal folder Id
Expand | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||
|
Expand | |||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||
|
Expand | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||
Expand | ||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||
Panel | ||||||||||||||||||||||||||||||||||
|
parameter | type | description |
---|---|---|
testExecKey | String | - key of the test execution. |
QUERY PARAMETERS
parameter | type | description |
---|---|---|
detailed | boolean | - if true will display detailed information about the test run |
Tip | ||
---|---|---|
| ||
curl -H "Content-Type: application/json" -X GET -u admin:admin http://yourserver/rest/raven/1.0/api/testexec/TEST-123/test curl -H "Content-Type: application/json" -X GET -u admin:admin http://yourserver/rest/raven/1.0/api/testexec/TEST-123/test?detailed=true |
Responses
200 OK : text/plain : Successful. Return a json.
Code Block | ||
---|---|---|
| ||
[
{
"id":204,
"key":"CALC-10",
"rank":1,
"status":"FAIL"
},
{
"id":205,
"key":"CALC-44",
"rank":2,
"status":"FAIL"
},
{
"id":326,
"key":"CALC-66",
"rank":3,
"status":"TODO"
},
{
"id":380,
"key":"CALC-42",
"rank":4,
"status":"TODO"
}
] |
Code Block | ||
---|---|---|
| ||
[
{
"id":204,
"status":"FAIL"
"assignee":"admin",
"executedBy":"admin",
"startedOn":"Friday 10:13 AM",
"finishedOn":"Friday 10:13 AM",
"defects":[
{
"id":10607,
"key":"PER-71",
"summary":"1234",
"status":"Open"
}
],
"evidences":[
{
"id":25,
"fileName":"stepsDATA.csv",
"fileSize":"0,1 kB",
"created":"Friday 10:16 AM",
"author":"admin",
"fileURL":"http://localhost:5980/testJira/plugins/servlet/raven/attachment/25/stepsDATA.csv"
}
],
"key":"PER-46",
"rank":1
},
{
"id":60,
"status":"FAIL",
"executedBy":"admin",
"startedOn":"Friday 10:13 AM",
"finishedOn":"Friday 10:13 AM",
"defects":[
],
"evidences":[
],
"key":"PER-41",
"rank":2
},
{
"id":61,
"status":"ABORTED",
"executedBy":"blake",
"startedOn":"Friday 10:13 AM",
"finishedOn":"Friday 10:13 AM",
"defects":[
],
"evidences":[
],
"key":"PER-33",
"rank":3
}
] |
400 BAD_REQUEST : text/plain : Returns the error.
401 UNAUTHORIZED : text/plain : The Xray for JIRA license is not valid.
500 INTERNAL SERVER ERROR : text/plain : An internal error occurred getting the tests.
title | POST /rest/raven/1.0/api/testexec/{testExecKey}/test |
---|
Panel | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||
Associate tests with the test execution. Return error messages, if there are any. RequestPATH PARAMETERS
Example
Responses200 OK 204 No content : text/plain : Successful. Return error messages, if there are any. Code Block | | ||||||||||||||||
|
Expand | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||
|