Uploaded image for project: 'Xray for Jira'
  1. Xray for Jira
  2. XRAY-1256

As a machine, the REST API should return a list of Tests contained in a Test repository's folder

    XporterXMLWordPrintable

Details

    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,
      }

       

      Attachments

        Activity

          People

            pmmr Pedro Rodrigues
            smsf Sergio Freire
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 2 days Original Estimate - 2 days
                2d
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 week, 3 days, 7 hours, 45 minutes
                1w 3d 7h 45m