Page History
Settings
Some settings can be exported using the REST API.
This page provides a list of the available endpoints available for managing Xray related settings.
Table of Contents | ||
---|---|---|
|
Test Statuses
To obtain a list of all Test (Run) Statuses, including the default ones
...
,
...
you just need to
...
invoke the following endpoint.
Expand | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||
|
Test Step Statuses
To obtain a list of all Tes Step Statuses, including the default ones, you just need to invoke the following endpoint.
Expand | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||
Responses200 OK : textapplication/plainjson : Successful. Return a json that represents the test runReturns a JSON with all the Test Step Statuses along with some information, including name, description, ranking and mapping to the Test (Run) Status.
400 BAD_REQUEST : text/plain : Returns the error. 401 UNAUTHORIZED : text/plain : The Xray license is not valid. 500 INTERNAL SERVER ERROR : text/plain : An internal error occurred getting the test run. | |||||||||||||||||||||||||
Expand | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
Panel | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
parameter | type | description | |||||||||||||||||||||||
id | integer | - ID of the test run. |
Code Block | ||
---|---|---|
| ||
{
"status": "FAIL",
"comment": "new comment",
"defects": {
"add": [
"test-114",
"test-115",
"test-116"
]
},
"evidences": {
"add": [{
"filename": "test1.txt",
"contentType": "plain/text",
"data": "(base64 encoding...)"
}, {
"filename": "test2.txt",
"contentType": "plain/text",
"data": "(base64 encoding...)"
}],
"remove": ["254", "443"]
},
"examples": [{
"id": "1379",
"status": "TODO"
}]
} |
Code Block | ||
---|---|---|
| ||
{
"status": "FAIL",
"comment": "new comment",
"defects": {
"add": [
"test-114",
"test-115",
"test-116"
]
},
"evidences": {
"add": [{
"filename": "test1.txt",
"contentType": "plain/text",
"data": "(base64 encoding...)"
}, {
"filename": "test2.txt",
"contentType": "plain/text",
"data": "(base64 encoding...)"
}],
"remove": ["254", "443"]
},
"steps": [{
"id": "731",
"status": "TODO",
"comment": "the comment 1"
}, {
"id": "730",
"status": "PASS",
"defects": {
"add": [
"test-114",
"test-115",
"test-116",
"appId=a364a9c7-9ac0-3183-9175-353c1331692a&issue=SDP-5"
]
},
"evidences": {
"add": [{
"filename": "test1.txt",
"contentType": "plain/text",
"data": "(base64 encoding...)"
}, {
"filename": "test2.txt",
"contentType": "plain/text",
"data": "(base64 encoding...)"
}],
"remove": ["274", "543"]
}
}]
} |
Code Block | ||
---|---|---|
| ||
{
"status": "FAIL",
"defects": {"add":["appId=a364a9c7-9ac0-3183-9175-353c1331692a&issue=SDP-5"], "remove":["DCW-9", "appId=a364a9c7-9ac0-3183-9175-353c1331692a&issue=SDP-1"]},
"evidences": [],
"steps": [
{
"id": 43,
"status": "PASS",
"comment": "",
"defects": {"add":[], "remove":["DCW-9"]},
"evidences": []
},
{
"id": 44,
"status": "FAIL",
"defects": {},
"evidences": []
},
{
"id": 45,
"status": "FAIL",
"defects": {},
"evidences": []
}
]
} |
Tip | ||
---|---|---|
| ||
curl -H "Content-Type: application/json" -X PUT -u admin:admin --data @example.json http://yourserver / rest/raven/1.0/api/testrun/1 |
Responses
200 OK : text/plain : Successful.
400 BAD_REQUEST : text/plain : Returns the error.
401 UNAUTHORIZED : text/plain : The Xray license is not valid.
500 INTERNAL SERVER ERROR : text/plain : An internal error occurred updating the test run.
Status
- To view the status of a Test Run, you need to specify the ID of the Test Run.
- To update the status, an additional parameter is required: the Status that you want the Test Run to have.
| ||||||||||||||||||||||
Expand | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||
400 BAD_REQUEST : text/plain : Returns the error. 401 UNAUTHORIZED : text/plain : The Xray license is not valid. 500 INTERNAL SERVER ERROR : text/plain : An internal error occurred when getting the test run statusstep statuses. |