Test Steps Results

Test Step


Return a json that represents the test step.

Request

PATH PARAMETERS
parameter
type
description
idInteger

- id of the test run.

stepResultIdInteger- 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
idInteger

- id of the test run.

stepResultIdInteger- 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


Return a json that contains the test step status.

Request

PATH PARAMETERS
parameter
type
description
idInteger

- id of the test run.

stepResultIdInteger- id of the step.
curl -H "Content-Type: application/json" -X GET -u admin:admin http://yourserver/rest/raven/1.0/api/testrun/3/step/2/status

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
idInteger

- id of the test run.

stepResultIdInteger- id of the step.
QUERY PARAMETERS
parametertypedescription
statusString- The status we want the test step to have.
curl -H "Content-Type: application/json" -X PUT -u admin:admin http://yourserver/rest/raven/1.0/api/testrun/3/step/2/status?status=PASS

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


Return a json that contains an array with all the execution evidences the test step has.

 Request

PATH PARAMETERS

 

parameter
type
description
idInteger

- id of the test run.

stepResultIdInteger- 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
idInteger

- id of the test run.

stepResultIdInteger- 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
idInteger

- id of the test run.

stepResultIdInteger- 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
parametertypedescription
idInteger

- id of the test run.

stepResultIdInteger- id of the step.
attachmentIdInteger

- 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.