Versions Compared

Key

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

...

Expand
title GET /rest/raven/1.0/api/testrepository/<projectKey>/folders/<folderId>/tests
Panel
borderColor#ccc
borderStylesolid

Return a JSON object with a list of the Tests contained in a given folder of the Test Repository.

Request

PATH PARAMETERS
parametertypedescription
projectKeyString

project key

folderIdintegerinternal folder Id; "-1" corresponds to the root folder of the Test Repository


QUERY PARAMETERS
parametertypedescription
allDescendants
boolean

include all descendants (i.e. all child Tests); "false", by default

title
Tip
titleExample Request examples

curl -H "Content-Type: application/json" -X GET -u admin:admin http://yourserver/rest/raven/1.0/api/testrepository/<projectKey>/folders/<folderId>/tests

Tip

Example Request

curl -H "Content-Type: application/json" -X GET -u admin:admin http://yourserver//rest/raven/1.0/api/testrepository/<projectKey>/folders/<folderId>/tests?allDescendants=true


Responses

200 OK : text/plain : Successful. Returns a JSON object containing the Tests.


Each test will provide some information, including:

  • id: internal Test Id
  • key: Test's issue key
  • summary: Test's summary
  • assignee: Test's issue assignee
  • rank: rank of the Test in the parent folder ("1" corresponds to the first element)
  • workflowStatus: Test's workflow status
  • labels: array of all Test's assigned labels
  • components: array of all Test's assigned components
  • testType: Test type (e.g. "Manual", "Cucumber, "Generic")


Code Block
titleOutput example for listing only the direct descendants of a given folder
{
 "tests": [
   {
    "id": 24300, 
    "key": "FP-10",
    "summary": "Issue test create inside folder",
    "assignee": "",
    "rank": 1,
    "workflowStatus": "Open",
    "labels": [],
    "components": [],
    "testType": "Manual",
   },
   {
    "id": 24301,
    "key": "FP-11",
    "summary": "Issue test create inside folder",
    "assignee": "",
    "rank": 2,
    "workflowStatus": "Open",
    "labels": [],
    "components": [],
    "testType": "Manual",
   },
   {
    ...
   }
  ],
  "total": 3,
}
Code Block
titleOutput example for listing all descendants of a given folder
{
 "tests": [
   {
    "id": 24300,
    "key": "FP-10",
    "summary": "Issue test create inside folder",
    "assignee": "",
    "rank": 1,
    "workflowStatus": "Open",
    "labels": [],
    "components": [],
    "testType": "Manual",
   },
   {
    "id": 24301,
    "key": "FP-11",
    "summary": "Issue test create inside folder",
    "assignee": "",
    "rank": 1,
    "workflowStatus": "Open",
    "labels": [],
    "components": [],
    "testType": "Manual",
   },
   {
    ...
   }
  ],
  "total": 3,
}

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

...

Expand
titleGET /rest/raven/1.0/api/testrepository/testexec<projectKey>/{testExecKey}folders/test<folderId>
Panel
borderColor#ccc
borderStylesolid

Return Returns a json with a list of the test associated with the test executionJSON object with folder information.

Request

PATH PARAMETERS
parametertypedescription
testExecKey
projectKeyString
-

project key

of the test execution.
QUERY PARAMETERS
parametertypedescription
detailedboolean

- if true will display detailed information about the test run

folderIdintegerinternal folder Id
Tip
titleRequest example
Tip
titleExample Request

curl -H "Content-Type: application/json" -X GET -u admin:admin http://yourserver/rest/raven/1.0/api/testrepository/testexecFP/TEST-123/test

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

Responses

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

folders/6

Responses

200 OK : text/plain : Successful. Returns a JSON object.

Code Block
titleExample Output example
[
   {
      "id":204 6,
    "rank": 1,
  "keyname": "CALC-10Folder1",
      "ranktestRepositoryPath":1,
      "status":"FAIL"
   },
   {
      "id":205,
      "key":"CALC-44",
      "rank":2,
      "status":"FAIL"
   },
   {
      "id":326,
      "key":"CALC-66",
      "rank":3,
      "status":"TODO"
   },
   {
      "id":380,
      "key":"CALC-42",
      "rank":4,
      "status":"TODO"
   }
]"/Folder1"
  "testCount": 0,
  "totalTestCount": 0
}


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

Expand
titlePOST /rest/raven/1.0/api/testrepository/<projectKey>/folders/<folderId>
Panel
borderColor#ccc
borderStylesolid

Returns a JSON object with folder information.

Request

PATH PARAMETERS
parametertypedescription
projectKeyString

project key

folderIdintegerinternal folder Id; "-1" corresponds to the root folder of the Test Repository
Example
Code Block
titleExample Input
{
  "name": "Folder1"
}
Tip
titleRequest example

curl -H "Content-Type: application/json" -X POST -u admin:admin --data @example.json http://yourserver/rest/raven/1.0/api/testrepository/FP/folders/-1


Responses

200 OK : text/plain : Successful. Returns a JSON object.

Code Block
titleOutput example
{
  "id": 6,
  "rank": 1,
  "name": "Folder1",
  "testRepositoryPath": "/Folder1"
  "testCount": 0,
  "totalTestCount": 0
}


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

Expand
titlePUT /rest/raven/1.0/api/testrepository/<projectKey>/folders/<folderId>
Panel
borderColor#ccc
borderStylesolid

Returns a JSON object with folder information.

Request

PATH PARAMETERS
parametertypedescription
projectKeyString

project key

folderIdintegerinternal folder Id
Example
Code Block
titleExample Input
{
  "name": "Folder1",
  "rank": 4
}
Tip
titleRequest example

curl -H "Content-Type: application/json" -X PUT -u admin:admin --data @example.json http://yourserver/rest/raven/1.0/api/testrepository/FP/folders/6


Responses

200 OK : text/plain : Successful. Returns a JSON object ????

Code Block
titleOutput example
{
  "id": 6,
  "rank": 1,
  "name": "Folder1",
  "testRepositoryPath": "/Folder1"
  "testCount": 0,
  "totalTestCount": 0
}
Code Block
titleExample Output
[
   {
      "id":204,
      "status":"FAIL"
	  "assignee":"admin",
	  "executedBy":"admin",
      "startedOn":"Friday 10:13 AM",
      "finishedOn":"Friday 10:13 AM",
      "defects":[  
         {  
            "id":10607,
            "key":"PER-71",
            "summary":"1234",
            "status":"Open"
         }
      ],
      "evidences":[  
         {  
            "id":25,
            "fileName":"stepsDATA.csv",
            "fileSize":"0,1 kB",
            "created":"Friday 10:16 AM",
            "author":"admin",
            "fileURL":"http://localhost:5980/testJira/plugins/servlet/raven/attachment/25/stepsDATA.csv"
         }
      ],
      "key":"PER-46",
      "rank":1
   },
   {
      "id":60,
      "status":"FAIL",
      "executedBy":"admin",
      "startedOn":"Friday 10:13 AM",
      "finishedOn":"Friday 10:13 AM",
      "defects":[  
      ],
      "evidences":[  
      ],
      "key":"PER-41",
      "rank":2
   },
   {  
      "id":61,
      "status":"ABORTED",
      "executedBy":"blake",
      "startedOn":"Friday 10:13 AM",
      "finishedOn":"Friday 10:13 AM",
      "defects":[  
      ],
      "evidences":[  
      ],
      "key":"PER-33",
      "rank":3
   }
]


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

Expand
titlePATCH /rest/raven/1.0/api/testrepository/<projectKey>/folders/<folderId>\/tests
Panel
borderColor#ccc
borderStylesolid

Add/remove tests to/from the given Test Repository folder. Returns error messages, if there are any.

Request

PATH PARAMETERS
parametertypedescription
projectKeyString

project key

folderIdintegerinternal folder Id
Example
Code Block
titleExample Input
{
 "add": [
    "CALC-33",
    "CALC-75"
  ],
  "remove": [
    "CALC-25",
    "CALC-45"
  ]
}
Tip
titleExample Request
curl -H "Content-Type: application/json" -X PATCH -u admin:admin --data @example.json http://yourserver/rest/raven/1.0/api/testrepository/FP/folders/9/tests


Responses

200 OK : text/plain : Successful. Return error messages, if there are any.

Code Block
titleExample Output
["Issue with key CALC-33 not found or is not of type Test."]

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 associating the tests.

Expand
titleDELETE /rest/raven/1.0/api/testrepository/<projectKey>/folders/<folderId>
Panel
borderColor#ccc
borderStylesolid

Remove folder from the Test Repository.

Request

PATH PARAMETERS
parametertypedescription
projectKeyString

project key

folderIdintegerinternal folder Id
Tip
titleExample Request
curl -H "Content-Type: application/json" -X DELETE -u admin:admin http://yourserver/rest/raven/1.0/api/testrepository/FP/folders/6
Responses

200 OK : text/plain : Successful.

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 removing the test.