Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titlePUT /rest/raven/1.0/api/testrun/{id}/status
Panel
borderColor#ccc
borderStylesolid

Updates the test run status.

Request

PATH PARAMETERS
parametertypedescription
idinteger

- ID of the test run.

QUERY PARAMETERS
parametertypedescription
statusString- The status you want the test run to have.
Tip
titleExample Request
curl -H "Content-Type: application/json" -X PUT -u admin:admin http://yourserver/rest/raven/1.0/api/testrun/3/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 run status.

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 the defect issue key(s) 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.

...

Expand
titleDELETE /rest/raven/1.0/api/testrun/{id}/defect/{issueIdOrKey}
Panel
borderColor#ccc
borderStylesolid

Remove one or more defects from the test run.

  Request

PATH PARAMETERS
parametertypedescription
idinteger

- ID of the test run.

issueIdOrKeyString or Integer

- ID or key of the issue you want to remove from the defects.

Tip
titleExample Request
curl -H "Content-Type: application/json" -X DELETE -u admin:admin http://yourserver / rest/raven/1.0/api/testrun/2/defect/TEST-421

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

...

Evidence

  • To view the execution evidences evidence of a Test Run, you need to specify the ID of the Test Run. 
  • To add a new execution evidence to evidence to the Test Run, a JSON is required.
  • To delete one or more execution evidences evidence 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.

...

Expand
titleGET /rest/raven/1.0/api/testrun/{id}/attachment
Panel
borderColor#ccc
borderStylesolid

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

  Request

PATH PARAMETERS
parametertypedescription
idinteger

- id of the test run.

Tip
titleExample Request
curl -H "Content-Type: application/json" -X GET -u admin:admin http://yourserver/rest/raven/1.0/api/testrun/3/attachment

Responses

200 OK : text/plain : Successful. Returns a json with the test run execution evidencesevidence.

Code Block
titleExample Output
[
   {
      "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 evidencesevidence.

Expand
titlePOST /rest/raven/1.0/api/testrun/{id}/attachment
Panel
borderColor#ccc
borderStylesolid

Add a new evidence to the test run.

Request

PATH PARAMETERS
parametertypedescription
idinteger

- id of the test run.

Example
Code Block
titleExample Input
{
   "data":"iVBORw0KGgoAAAANSUhEUgAABkIAAAO9CAYAAADezXv6AAAAAXNSR0IArs4c6QAA(...base64 file enconding)",
   "filename":"image21.jpg",
   "contentType":"image/jpeg"
}
Tip
titleExample Request
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.

...