Page History
...
Execution defects
- To view the defects of a Test Run, you need to specify the ID of the Test Run.
- To add a new defect to the Test Run, a JSON with an of issue keys is required.
- To delete one or more defects from the Test Run, you need to specify the key of the issue you want to delete.
...
title | GET /rest/raven/1.0/api/testrun/{id}/defect |
---|
...
borderColor | #ccc |
---|---|
borderStyle | solid |
Return a json that contains an array with all the defects the test run has.
Request
PATH PARAMETERS
parameter | type | description |
---|---|---|
id | integer | - id of the test run. |
...
title | Example Request |
---|
...
Responses
200 OK : text/plain : Successful. Returns a json with the test run defects.
Code Block | ||
---|---|---|
| ||
[
{
"id":15017,
"key":"TEST-114",
"summary":"summary 1",
"status":"Open"
},
{
"id":15018,
"key":"TEST-115",
"summary":"summary 2",
"status":"Open"
},
{
"id":15019,
"key":"TEST-116",
"summary":"summary 3",
"status":"Open"
}
] |
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 defects.
Expand | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||
|
...
title | DELETE /rest/raven/1.0/api/testrun/{id}/defect/{issueIdOrKey} |
---|
...
borderColor | #ccc |
---|---|
borderStyle | solid |
Remove one or more defects from the test run.
Request
PATH PARAMETERS
...
- ID of the test run.
...
- ID or key of the issue you want to remove from the defects.
...
title | Example Request |
---|
...
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 when inserting the defects.
Execution Evidences
- To view the execution evidences of a Test Run, you need to specify the ID of the Test Run.
- To add a new execution evidence to the Test Run, a JSON is required.
- To delete one or more execution evidences from the Test Run, you need to send a JSON with the file name of the evidence you want to delete. Another way to delete an execution evidence is to specify the evidence ID.
...
title | GET /rest/raven/1.0/api/testrun/{id}/attachment |
---|
...
borderColor | #ccc |
---|---|
borderStyle | solid |
Return a json that contains an array with all the execution evidences the test run has.
Request
PATH PARAMETERS
...
- id of the test run.
...
title | Example Request |
---|
...
Responses
200 OK : text/plain : Successful. Returns a json with the test run execution evidences.
Code Block | ||
---|---|---|
| ||
[
{
"id":253,
"fileName":"TestdataPoorPerfomance.csv",
"fileSize":"35 kB",
"created":"2016-10-24T15:50:57+01:00",
"author":"admin",
"fileURL": "http://YOURJIRA/jira/plugins/servlet/raven/attachment/253/TestdataPoorPerfomance.csv"
},
{
"id":254,
"fileName":"testfile.txt",
"fileSize":"35 kB",
"created":"2016-10-24T16:50:57+01:00",
"author":"admin"
"fileURL": "http://YOURJIRA/jira/plugins/servlet/raven/attachment/254/testfile.txt"
}
] |
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 evidences.
...
title | POST /rest/raven/1.0/api/testrun/{id}/attachment |
---|
...
borderColor | #ccc |
---|---|
borderStyle | solid |
Add a new evidence to the test run.
Request
PATH PARAMETERS
...
- id of the test run.
Example
Code Block | ||
---|---|---|
| ||
{
"data":"iVBORw0KGgoAAAANSUhEUgAABkIAAAO9CAYAAADezXv6AAAAAXNSR0IArs4c6QAA(...base64 file enconding)",
"filename":"image21.jpg",
"contentType":"image/jpeg"
} |
Tip | ||
---|---|---|
| ||
curl -H "Content-Type: application/json" -X POST -u admin:admin --data @example.json http://yourserver / rest/raven/1.0/api/testrun/2/attachment |
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 when inserting the evidences.
...
title | DELETE /rest/raven/1.0/api/testrun/{id}/attachment |
---|
...
borderColor | #ccc |
---|---|
borderStyle | solid |
Remove all evidences with the same filename from the test run.
Request
PATH PARAMETERS
...
- ID of the test run.
Example
Code Block | ||
---|---|---|
| ||
image.png |
...
title | Example Request |
---|
...
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 when deleting the evidences .
...
title | DELETE /rest/raven/1.0/api/testrun/{id}/attachment/{attachmentid} |
---|
...
borderColor | #ccc |
---|---|
borderStyle | solid |
Remove the evidence with the given attachment id.
Request
PATH PARAMETERS
...
- id of the test run.
...
- id of the attachment we want to delete.
...
title | Example Request |
---|
...
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 when deleting the evidences.
Comment
- To view the comment of a Test Run, you need to specify the ID of the Test Run.
- To update the comment, you need to send a JSON with the comment that you want the Test Run to have.
...
title | GET /rest/raven/1.0/api/testrun/{id}/comment |
---|
...
borderColor | #ccc |
---|---|
borderStyle | solid |
Return a json that contains the test run comment in raw and rendered state.
Request
PATH PARAMETERS
...
- id of the test run.
...
title | Example Request |
---|
...
Responses
200 OK : text/plain : Successful. Returns a json with the test run comment.
Code Block | ||
---|---|---|
| ||
{
"raw":"this is the test run comment.",
"rendered":"<p>this is the test run comment.</p>"
} |
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 comment.
Expand | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||
|
Examples
- To view all examples of a Test Run, you need to specify the ID of the Test Run.
- To view or edit a specific test example, check out Test Examples - REST
...
title | GET /rest/raven/1.0/api/testrun/{id}/example |
---|
...
borderColor | #ccc |
---|---|
borderStyle | solid |
Return a json that contains all of the test run examples .
Request
PATH PARAMETERS
parameter | type | description |
---|---|---|
id | integer | - id of the test run. |
...
title | Example Request |
---|
...
Responses
200 OK : text/plain : Successful. Returns a json with the test run examples.
Code Block | ||
---|---|---|
| ||
[
{
"id": 5068,
"rank": 1,
"values": [
"0",
"factorial",
"1"
],
"status": "PASS",
"duration": "0 millisec",
"backgrounds": [
{
"id": 1337,
"rank": 1,
"type": "background",
"keyword": "Given ",
"name": "a calculator I just turned on",
"duration": "0 millisec",
"status": "PASS"
}
],
"hooks": [
{
"id": 1338,
"rank": 2,
"type": "hook",
"keyword": "Before",
"name": "FactorialCalculator.setUp()",
"duration": "0 millisec",
"status": "PASS"
},
{
"id": 1339,
"rank": 3,
"type": "hook",
"keyword": "After",
"name": "FactorialCalculator.tearDown()",
"duration": "0 millisec",
"status": "PASS"
}
],
"steps": [
{
"id": 1340,
"rank": 4,
"type": "scenario",
"keyword": "Given ",
"name": "I have entered 3 into the calculator",
"duration": "0 millisec",
"status": "PASS"
},
{
"id": 1341,
"rank": 5,
"type": "scenario",
"keyword": "When ",
"name": "I press factorial",
"duration": "0 millisec",
"status": "PASS"
},
{
"id": 1342,
"rank": 6,
"type": "scenario",
"keyword": "Then ",
"name": "the result should be 6 on the screen",
"duration": "0 millisec",
"status": "PASS"
}
]
},
{
"id": 5069,
"rank": 2,
"values": [
"1",
"factorial",
"1"
],
"status": "FAIL",
"duration": "2 millisec",
"backgrounds": [
{
"id": 1343,
"rank": 7,
"type": "background",
"keyword": "Given ",
"name": "a calculator I just turned on",
"duration": "0 millisec",
"status": "PASS"
}
],
"hooks": [
{
"id": 1344,
"rank": 8,
"type": "hook",
"keyword": "Before",
"name": "FactorialCalculator.setUp()",
"duration": "0 millisec",
"status": "PASS"
},
{
"id": 1345,
"rank": 9,
"type": "hook",
"keyword": "After",
"name": "FactorialCalculator.tearDown()",
"duration": "0 millisec",
"status": "PASS"
}
],
"steps": [
{
"id": 1346,
"rank": 10,
"type": "scenario",
"keyword": "Given ",
"name": "I have entered 4 into the calculator",
"duration": "0 millisec",
"status": "PASS"
},
{
"id": 1347,
"rank": 11,
"type": "scenario",
"keyword": "When ",
"name": "I press factorial",
"duration": "0 millisec",
"status": "PASS"
},
{
"id": 1348,
"rank": 12,
"type": "scenario",
"keyword": "Then ",
"name": "the result should be 65 on the screen",
"duration": "2 millisec",
"logError": "java.lang.AssertionError: \nExpected: is <65L>\n but: was <24L>\r\n\tat org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)\r\n\tat org.junit.Assert.assertThat(Assert.java:956)\r\n\tat org.junit.Assert.assertThat(Assert.java:923)\r\n\tat com.xpandit.automation.cucumber.FactorialCalculator.theResultShouldBeOutputOnTheScreen(FactorialCalculator.java:47)\r\n\tat ✽.Then the result should be 65 on the screen(com/xpandit/automation/cucumber/2_factorial_error.feature:11)",
"status": "FAIL"
}
]
}
] |
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 examples.
Test Steps
- To view all the test steps of a Test Run, you need to specify the ID of the Test Run.
- To view or edit a specific test step, check out Test Steps - REST
...
title | GET /rest/raven/1.0/api/testrun/{id}/step |
---|
...
borderColor | #ccc |
---|---|
borderStyle | solid |
Return a json that contains all of the test run steps.
Request
PATH PARAMETERS
parameter | type | description |
---|---|---|
id | integer | - id of the test run. |
...
title | Example Request |
---|
...
Responses
200 OK : text/plain : Successful. Returns a json with the test run steps.
Code Block | ||
---|---|---|
| ||
[
{
"id":729,
"index":1,
"step":{
"raw":"ssaf",
"rendered":"<p>ssaf</p>"
},
"data":{
"raw":"asdf",
"rendered":"<p>asdf</p>"
},
"result":{
"raw":"asdfasdf",
"rendered":"<p>asdfasdf</p>"
},
"attachments":[
],
"status":"EXECUTING",
"comment":{
"raw":"asdasdasdasdasd",
"rendered":"<p>asdasdasdasdasd</p>"
},
"defects":[
{
"id":15018,
"key":"CALC-115",
"summary":"Ad-hoc execution for CALC-93",
"status":"Open"
}
],
"evidences":[
{
"id":216,
"fileName":"1 (24).feature",
"fileSize":"0,4 kB",
"created":"2016-10-24T15:50:57+01:00",
"author":"admin"
"fileURL": "http://YOURJIRA/jira/plugins/servlet/raven/attachment/253/1 (24).feature"
}
]
},
{
"id":730,
"index":2,
"step":{
"raw":"asfd",
"rendered":"<p>asfd</p>"
},
"data":{
"raw":"aaa",
"rendered":"<p>aaa</p>"
},
"result":{
"raw":"aaaa",
"rendered":"<p>aaaa</p>"
},
"attachments":[
],
"status":"FAIL",
"comment":{
"raw":"aaaaa\n",
"rendered":"<p>aaaaa</p>"
},
"defects":[
],
"evidences":[
]
}
] |
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 steps.