Versions Compared

Key

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

...

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.

...

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.

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

Remove all evidences with the same filename from the test run.

Request

PATH PARAMETERS
parametertypedescription
idinteger

- ID of the test run.

Example
Code Block
titleExample Input
image.png
Tip
titleExample Request
curl -H "Content-Type: application/json" -X DELETE -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 deleting the evidences .

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

Remove the evidence with the given attachment id.

Request

PATH PARAMETERS
parametertypedescription
idInteger

- id of the test run.

attachmentidInteger

- id of the attachment we want to delete.

Tip
titleExample Request
curl -H "Content-Type: application/json" -X DELETE -u admin:admin http://yourserver / rest/raven/1.0/api/testrun/2/attachment/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 when deleting the evidences.

...

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

Update the comment and the return a json that contains the updated test run comment in raw and rendered state.

Request

PATH PARAMETERS
parametertypedescription
idinteger

- id of the test run.

Example
Code Block
titleExample input
This is the new test run comment.
Tip
titleExample Request
curl -H "Content-Type: application/json" -X PUT -u admin:admin --data @example.json http://yourserver / rest/raven/1.0/api/testrun/2/comment

Responses

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

Code Block
titleExample Output
{
   "raw":"this is the new test run comment.",
   "rendered":"<p>this is the new 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 updating the test run comment.

...

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

Return a json that contains all of the test run examples .

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/example

Responses

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

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

...

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

Return a json that contains all of the test run steps.

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/step

Responses

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

Code Block
titleExample Output
[
   {
      "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"
         }
      ],
	  "actualResult": {
      	"raw": "Actual result on step 1",
        "rendered": "<p>Actual result on step 1</p>"
      }
   },
   {
      "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":[
      ],
	  "actualResult": {
		"rendered": ""
	  }
   }
]

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.

...