Jaa


Test suite entries

TFS 2017 | TFS 2015 | TFS 2013

Note

Looking for REST APIS that support TFS 2018 or later versions? See the Azure DevOps REST API Reference.

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 TFS server name ({server:port}).
project string Name or ID of the 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://mytfsserver/DefaultCollection/Fabrikam/_apis/test/suiteentry/339?api-version=3.0-preview.1

Sample response

{
  "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 TFS server name ({server:port}).
project string Name or ID of the 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://mytfsserver/DefaultCollection/Fabrikam/_apis/test/suiteentry/339?api-version=3.0-preview.1
[
  {
    "sequenceNumber": 2,
    "testCaseId": 401,
    "childSuiteId": 0
  },
  {
    "sequenceNumber": 0,
    "testCaseId": 402,
    "childSuiteId": 0
  },
  {
    "sequenceNumber": 1,
    "testCaseId": 341,
    "childSuiteId": 0
  }
]

Sample response

{
  "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
    }
  ]
}