Page tree

Versions Compared

Key

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

...

Expand
titleGET /rest/raven/1.0/api/test
Panel
borderColor#ccc
borderStylesolid

Return a json with the exported tests.

Request

QUERY PARAMETERS
parametertypedescription
keysString

- list of keys of the tests separated by ';'.

filterLong- id of the filter.
 jqlString - jql query. 
Tip
titleExample Request

curl -H "Content-Type: application/json" -X GET -u admin:admin http://yourserver/rest/raven/1.0/api/test?keys=TEST-123;TEST-321

curl -H "Content-Type: application/json" -X GET -u admin:admin http://yourserver/rest/raven/1.0/api/test?filter=12030

curl -H "Content-Type: application/json" -X GET -u admin:admin http://yourserver/rest/raven/1.0/api/test?jql=project%20=%2011000%20and%20issuetype%20=%207

curl -H "Content-Type: application/json" -X GET -u admin:admin http://yourserver/rest/raven/1.0/api/test?keys=TEST-123;TEST-321&filter=12030&jql=project%20=%2011000%20and%20issuetype%20=%207


Its Note: It's necessary to url URl escape the jqlJQL query.

Responses

200 OK : text/plain : Successful. Return a json.

Code Block
titleExample Output
[   
   {   
      "key":"PER-1098",
      "self":"http://yourserver/rest/api/2/issue/15798",
      "reporter":"admin",
      "assignee":"admin",
      "precondition":[   
         {   
            "preconditionKey":"PER-1232",
            "self":"http://yourserver/rest/api/2/issue/16000",
            "reporter":"admin",
            "assignee":"admin",
            "type":"Automated[Cucumber]",
            "condition":"Condition example"
         }
      ],
      "type":"Automated[Cucumber]",
	  "status":"TODO",
      "definition":"Given I have entered <input_1> into the calculator\nAnd I have entered <input_2> into the calculator\nWhen I press <button>\nThen the result should be <output> on the screen\n\nExamples: \n    | input_1 | input_2 | button | output |\n    | 20      | 30      | add    | 50     |\n    | 2       | 5       | add    | 7      |\n    | 0       | 40      | add    | 40     |"
   },
   {   
      "key":"PER-1099",
      "self":"http://yourserver/rest/api/2/issue/15799",
      "reporter":"admin",
      "assignee":"admin",
      "precondition":[   

      ],
      "type":"Automated[Generic]",
	  "status":"FAIL",
      "definition":"Test definition example"
   },
   {   
      "key":"PER-1233",
      "self":"http://yourserver/rest/api/2/issue/16001",
      "reporter":"admin",
      "assignee":"admin",
      "precondition":[   

      ],
      "type":"Manual",
	  "status":"PASS",
      "definition":{   
         "steps":[   
            {   
               "id":10940,
               "index":1,
               "step":{   
                  "raw":"step1",
                  "rendered":"<p>step1</p>"
               },
               "data":{   
                  "raw":"data1",
                  "rendered":"<p>data1</p>"
               },
               "result":{   
                  "raw":"result1",
                  "rendered":"<p>result1</p>"
               },
               "attachments":[   

               ]
            },
            {   
               "id":10941,
               "index":2,
               "step":{   
                  "raw":"step2",
                  "rendered":"<p>step2</p>"
               },
               "data":{   
                  "raw":"data2",
                  "rendered":"<p>data2</p>"
               },
               "result":{   
                  "raw":"result2",
                  "rendered":"<p>result2</p>"
               },
               "attachments":[   

               ]
            }
         ]
      }
   }
]

400 BAD_REQUEST : text/plain : Returns the error.

401 UNAUTHORIZED : text/plain : The Xray for JIRA license is not valid.

500  INTERNAL SERVER ERROR : text/plain : An internal error occurred getting the test steps.

...