Test Steps Results
Test Step
- To view a Test Step, you need to specify the ID of the Test Run and the ID of the test step.
- To update a Test Step, you need to send a JSON with the Test Step fields you want to update.
Return a json that represents the test step.
Request
PATH PARAMETERS
parameter | type | description |
---|---|---|
id | Integer | - id of the test run. |
stepResultId | Integer | - id of the step. |
Responses
200 OK : text/plain : Successful. Return a json that represents the test step.
{ "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":"Wednesday 5:09 PM", "author":"admin", "fileURL": "http://YOURJIRA/jira/plugins/servlet/raven/attachment/253/1 (24).feature" } ], "actualResult":{ "raw":"Actual result", "rendered":"<p>Actual result</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 getting the test run.
Update the test run step. The fields that can be updated on the test run are: status, comment, defects and evidences.
Defects and evidences mentioned directly by the respective attributes are always added to the ones that may exist at the step.
Request
PATH PARAMETERS
parameter | type | description |
---|---|---|
id | Integer | - id of the test run. |
stepResultId | Integer | - id of the step. |
Example
{ "id":"729", "status":"PASS", "comment":"The comment", "defects":[ "TEST-114", "TEST-115", "TEST-116" ], "evidences":[ { "filename":"test.txt", "contentType":"plain/text", "data":"(BASE64 encoding)" } ], "actualResult":"The actual result" }
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 step.
Status
- To view the status of a Test Step, you need to specify the ID of the Test Run and the ID of the Test Step.
- To update the status of a Test Step, you need to specify the ID of the Test Run, the ID of the Test Step and the Status that you want the Test Step to have.
Return a json that contains the test step status.
Request
PATH PARAMETERS
parameter | type | description |
---|---|---|
id | Integer | - id of the test run. |
stepResultId | Integer | - id of the step. |
Example Request
Responses
200 OK : text/plain : Successful. Returns the name of the test step Status.
PASS
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 status.
Update the test step status.
Request
PATH PARAMETERS
parameter | type | description |
---|---|---|
id | Integer | - id of the test run. |
stepResultId | Integer | - id of the step. |
QUERY PARAMETERS
parameter | type | description |
---|---|---|
status | String | - The status we want the test step to have. |
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 updating the test step status.
Execution Evidences
- To view the execution evidences of a Test Step, you need to specify the ID of the Test Run and the ID of the Test Step.
- 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.
Return a json that contains an array with all the execution evidences the test step has.
Request
PATH PARAMETERS
parameter | type | description |
---|---|---|
id | Integer | - id of the test run. |
stepResultId | Integer | - id of the step. |
Responses
200 OK : text/plain : Successful. Returns a json with the test step execution evidences.
[ { "id":216, "fileName":"1 (24).feature", "fileSize":"0,4 kB", "created":"Wednesday 5:09 PM", "author":"admin", "fileURL":"http://YOURJIRA/jira/plugins/servlet/raven/attachment/253/1 (24).feature" } ]
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.
Add a new evidence to the test step.
Request
PATH PARAMETERS
parameter | type | description |
---|---|---|
id | Integer | - id of the test run. |
stepResultId | Integer | - id of the step. |
Example
{ "data":"iVBORw0KGgoAAAANSUhEUgAABkIAAAO9CAYAAADezXv6AAAAAXNSR0IArs4c6QAA(...base64 file enconding)", "filename":"image21.jpg", "contentType":"image/jpeg" }
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.
Remove all evidences with the same filename from the test step.
Request
PATH PARAMETERS
parameter | type | description |
---|---|---|
id | Integer | - id of the test run. |
stepResultId | Integer | - id of the step. |
Example
image.png
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.
Remove the evidence with the given attachment id.
Request
PATH PARAMETERS
parameter | type | description |
---|---|---|
id | Integer | - id of the test run. |
stepResultId | Integer | - id of the step. |
attachmentId | Integer | - id of the attachment we want to delet |
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.