Test suite entries

Last Update: 12/5/2016

api-version = 3.0-preview.1

If you haven't already, look at the information on getting started with these APIs.

Get a list of test suite entries

GET https://{instance}/DefaultCollection/{project}/_apis/test/suiteEntry/{suiteId}?api-version={version}
Parameter Type Notes
URL
instance string VS Team Services account ({account}.visualstudio.com) or TFS server ({server:port}).
project string Name or ID of the team project.
suiteId int ID of the parent suite of the suite entries to get.
api-version string Version of the API to use.

Sample request

GET https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/Fabrikam/_apis/test/suiteentry/339?api-version=3.0-preview.1

Sample response

Status code: 200
{
  "count": 2,
  "value": [
    {
      "suiteId": 339,
      "sequenceNumber": 0,
      "testCaseId": 341,
      "childSuiteId": 0
    },
    {
      "suiteId": 339,
      "sequenceNumber": 1,
      "testCaseId": 401,
      "childSuiteId": 0
    }
  ]
}

Reorder suite entries in a test suite

PATCH https://{instance}/DefaultCollection/{project}/_apis/test/suiteEntry/{suiteId}?api-version={version}
Content-Type: application/json
{
  "testCaseId": { int },
  "childSuiteId": { int },
  "suiteId": { int },
  "sequenceNumber": { int }
}
Parameter Type Default Value Notes
URL
instance string VS Team Services account ({account}.visualstudio.com) or TFS server ({server:port}).
project string Name or ID of the team project.
suiteId int ID of the parent suite of the suite entries to reorder.
api-version string Version of the API to use.
Body
testCaseId int 0 ID of the test case.
childSuiteId int 0 ID of child suite.
sequenceNumber int New sequence number of the suite entry in suite.
suiteId int ID of the parent suite of the suite entry.

Sample request

PATCH https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/Fabrikam/_apis/test/suiteentry/339?api-version=3.0-preview.1
Content-Type: application/json
[
  {
    "sequenceNumber": 2,
    "testCaseId": 401,
    "childSuiteId": 0
  },
  {
    "sequenceNumber": 0,
    "testCaseId": 402,
    "childSuiteId": 0
  },
  {
    "sequenceNumber": 1,
    "testCaseId": 341,
    "childSuiteId": 0
  }
]

Sample response

Status code: 200
{
  "count": 3,
  "value": [
    {
      "suiteId": 339,
      "sequenceNumber": 0,
      "testCaseId": 402,
      "childSuiteId": 0
    },
    {
      "suiteId": 339,
      "sequenceNumber": 1,
      "testCaseId": 341,
      "childSuiteId": 0
    },
    {
      "suiteId": 339,
      "sequenceNumber": 2,
      "testCaseId": 401,
      "childSuiteId": 0
    }
  ]
}