Details
-
Story
-
Status: Closed
-
Major
-
Resolution: Done
-
None
-
R3.1.0 S2
-
Description
The REST API should provide a GET operation for obtaining a list of Tests contained in a given folder within the Test Repository associated with a given project key. An optional parameter "allDescendants" if true (false by default), will list all the child Tests including the ones belonging to some folders.
GET /rest/raven/1.0/api/testrepository/<projectKey>/folders/<folderId>/tests
Examples
// Test list by folder (with only direct childs): GET /rest/raven/1.0/api/testrepository/FP/folders/9/tests?pageStart=0&pageSize=10 { "tests": [ { "id": 24300, // corresponds to the Test issue id "key": "FP-10", "summary": "Issue test create inside folder", "assignee": "", "rank": 1, "workflowStatus": "Open", "labels": [], "components": [], "testType": "Manual", }, { "id": 24301, // corresponds to the Test issue id "key": "FP-11", "summary": "Issue test create inside folder", "assignee": "", "rank": 2, "workflowStatus": "Open", "labels": [], "components": [], "testType": "Manual", }, { ... } ], "total": 3, }
// Test list by folder (with all child tests): GET /rest/raven/1.0/api/testrepository/FP/folders/9/tests?pageStart=0&pageSize=10&allDescendants=true { "tests": [ { "id": 24300, // corresponds to the Test issue id "key": "FP-10", "summary": "Issue test create inside folder", "assignee": "", "rank": 1, "workflowStatus": "Open", "labels": [], "components": [], "testType": "Manual", "parentFolderId: 123, "parentTestRepositoryPath: "/Folder", }, { "id": 24301, // corresponds to the Test issue id "key": "FP-11", "summary": "Issue test create inside folder", "assignee": "", "rank": 1, "workflowStatus": "Open", "labels": [], "components": [], "testType": "Manual", "parentFolderId": 124, "parentTestRepositoryPath": "/Folder/Subfolder", }, { ... } ], "total": 3, }