Test Suites - Get Test Suites For Plan
Get test suites for plan.
GET https://dev.azure.com/{organization}/{project}/_apis/test/Plans/{planId}/suites?api-version=5.0
GET https://dev.azure.com/{organization}/{project}/_apis/test/Plans/{planId}/suites?$expand={$expand}&$skip={$skip}&$top={$top}&$asTreeView={$asTreeView}&api-version=5.0
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
organization
|
path | True |
string |
The name of the Azure DevOps organization. |
plan
|
path | True |
integer int32 |
ID of the test plan for which suites are requested. |
project
|
path | True |
string |
Project ID or project name |
api-version
|
query | True |
string |
Version of the API to use. This should be set to '5.0' to use this version of the api. |
$as
|
query |
boolean |
If the suites returned should be in a tree structure. |
|
$expand
|
query |
integer int32 |
Include the children suites and testers details. |
|
$skip
|
query |
integer int32 |
Number of suites to skip from the result. |
|
$top
|
query |
integer int32 |
Number of Suites to be return after skipping the suites from the result. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
successful operation |
Security
oauth2
Type:
oauth2
Flow:
accessCode
Authorization URL:
https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
Token URL:
https://app.vssps.visualstudio.com/oauth2/token?client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer
Scopes
Name | Description |
---|---|
vso.test | Grants the ability to read test plans, cases, results and other test management related artifacts. |
Examples
Sample Request
GET https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/test/Plans/1/suites?api-version=5.0
Sample Response
{
"value": [
{
"id": 1,
"name": "sprint1",
"url": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/test/Plans/1/Suites/1",
"project": {
"id": "eb6e4656-77fc-42a1-9181-4c6d8e9da5d1",
"name": "Fabrikam-Fiber-TFVC",
"url": "https://dev.azure.com/fabrikam/_apis/projects/Fabrikam-Fiber-TFVC"
},
"plan": {
"id": "1",
"name": "sprint1",
"url": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/test/Plans/1"
},
"revision": 40,
"testCaseCount": 2,
"suiteType": "StaticTestSuite",
"testCasesUrl": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/test/Plans/1/Suites/1/testcases",
"inheritDefaultConfigurations": false,
"defaultConfigurations": [
{
"id": "2",
"name": "Windows 8"
}
],
"state": "InProgress",
"lastUpdatedBy": {
"id": "e5a5f7f8-6507-4c34-b397-6c4818e002f4",
"displayName": "Fabrikam Fiber",
"uniqueName": "fabrikamfiber1@outlook.com",
"url": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/e5a5f7f8-6507-4c34-b397-6c4818e002f4",
"imageUrl": "https://dev.azure.com/fabrikam/_api/_common/identityImage?id=e5a5f7f8-6507-4c34-b397-6c4818e002f4"
},
"lastUpdatedDate": "2014-05-06T14:53:56.483Z"
},
{
"id": 20,
"name": "NewTestSuite",
"url": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/test/Plans/1/Suites/20",
"project": {
"id": "eb6e4656-77fc-42a1-9181-4c6d8e9da5d1",
"name": "Fabrikam-Fiber-TFVC",
"url": "https://dev.azure.com/fabrikam/_apis/projects/Fabrikam-Fiber-TFVC"
},
"plan": {
"id": "1",
"name": "sprint1",
"url": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/test/Plans/1"
},
"parent": {
"id": "1",
"name": "sprint1",
"url": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/test/Plans/1/Suites/1"
},
"revision": 9,
"testCaseCount": 0,
"suiteType": "StaticTestSuite",
"testCasesUrl": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/test/Plans/1/Suites/20/testcases",
"inheritDefaultConfigurations": false,
"defaultConfigurations": [
{
"id": "7",
"name": "Windows7"
},
{
"id": "8",
"name": "Windows 8.1"
},
{
"id": "9",
"name": "Windows 2012"
}
],
"state": "InProgress",
"lastUpdatedBy": {
"id": "e5a5f7f8-6507-4c34-b397-6c4818e002f4",
"displayName": "Fabrikam Fiber",
"uniqueName": "fabrikamfiber1@outlook.com",
"url": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/e5a5f7f8-6507-4c34-b397-6c4818e002f4",
"imageUrl": "https://dev.azure.com/fabrikam/_api/_common/identityImage?id=e5a5f7f8-6507-4c34-b397-6c4818e002f4"
},
"lastUpdatedDate": "2014-05-06T14:56:23.44Z"
},
{
"id": 36,
"name": "Dynamic",
"url": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/test/Plans/1/Suites/36",
"project": {
"id": "eb6e4656-77fc-42a1-9181-4c6d8e9da5d1",
"name": "Fabrikam-Fiber-TFVC",
"url": "https://dev.azure.com/fabrikam/_apis/projects/Fabrikam-Fiber-TFVC"
},
"plan": {
"id": "1",
"name": "sprint1",
"url": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/test/Plans/1"
},
"parent": {
"id": "20",
"name": "NewTestSuite",
"url": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/test/Plans/1/Suites/20"
},
"revision": 3,
"testCaseCount": 0,
"suiteType": "StaticTestSuite",
"testCasesUrl": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/test/Plans/1/Suites/36/testcases",
"inheritDefaultConfigurations": true,
"state": "InProgress",
"lastUpdatedBy": {
"id": "e5a5f7f8-6507-4c34-b397-6c4818e002f4",
"displayName": "Fabrikam Fiber",
"uniqueName": "fabrikamfiber1@outlook.com",
"url": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/e5a5f7f8-6507-4c34-b397-6c4818e002f4",
"imageUrl": "https://dev.azure.com/fabrikam/_api/_common/identityImage?id=e5a5f7f8-6507-4c34-b397-6c4818e002f4"
},
"lastUpdatedDate": "2014-05-06T14:22:12.007Z"
},
{
"id": 37,
"name": "Rules",
"url": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/test/Plans/1/Suites/37",
"project": {
"id": "eb6e4656-77fc-42a1-9181-4c6d8e9da5d1",
"name": "Fabrikam-Fiber-TFVC",
"url": "https://dev.azure.com/fabrikam/_apis/projects/Fabrikam-Fiber-TFVC"
},
"plan": {
"id": "1",
"name": "sprint1",
"url": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/test/Plans/1"
},
"parent": {
"id": "36",
"name": "Dynamic",
"url": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/test/Plans/1/Suites/36"
},
"revision": 2,
"testCaseCount": 0,
"suiteType": "StaticTestSuite",
"testCasesUrl": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/test/Plans/1/Suites/37/testcases",
"inheritDefaultConfigurations": true,
"state": "InProgress",
"lastUpdatedBy": {
"id": "e5a5f7f8-6507-4c34-b397-6c4818e002f4",
"displayName": "Fabrikam Fiber",
"uniqueName": "fabrikamfiber1@outlook.com",
"url": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/e5a5f7f8-6507-4c34-b397-6c4818e002f4",
"imageUrl": "https://dev.azure.com/fabrikam/_api/_common/identityImage?id=e5a5f7f8-6507-4c34-b397-6c4818e002f4"
},
"lastUpdatedDate": "2014-05-06T14:22:15.303Z"
},
{
"id": 38,
"name": "Project",
"url": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/test/Plans/1/Suites/38",
"project": {
"id": "eb6e4656-77fc-42a1-9181-4c6d8e9da5d1",
"name": "Fabrikam-Fiber-TFVC",
"url": "https://dev.azure.com/fabrikam/_apis/projects/Fabrikam-Fiber-TFVC"
},
"plan": {
"id": "1",
"name": "sprint1",
"url": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/test/Plans/1"
},
"parent": {
"id": "1",
"name": "sprint1",
"url": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/test/Plans/1/Suites/1"
},
"revision": 5,
"testCaseCount": 0,
"suiteType": "StaticTestSuite",
"testCasesUrl": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/test/Plans/1/Suites/38/testcases",
"inheritDefaultConfigurations": false,
"defaultConfigurations": [],
"state": "InProgress",
"lastUpdatedBy": {
"id": "e5a5f7f8-6507-4c34-b397-6c4818e002f4",
"displayName": "Fabrikam Fiber",
"uniqueName": "fabrikamfiber1@outlook.com",
"url": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/e5a5f7f8-6507-4c34-b397-6c4818e002f4",
"imageUrl": "https://dev.azure.com/fabrikam/_api/_common/identityImage?id=e5a5f7f8-6507-4c34-b397-6c4818e002f4"
},
"lastUpdatedDate": "2014-05-06T14:53:18.32Z"
},
{
"id": 39,
"name": "sample",
"url": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/test/Plans/1/Suites/39",
"project": {
"id": "eb6e4656-77fc-42a1-9181-4c6d8e9da5d1",
"name": "Fabrikam-Fiber-TFVC",
"url": "https://dev.azure.com/fabrikam/_apis/projects/Fabrikam-Fiber-TFVC"
},
"plan": {
"id": "1",
"name": "sprint1",
"url": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/test/Plans/1"
},
"parent": {
"id": "38",
"name": "Project",
"url": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/test/Plans/1/Suites/38"
},
"revision": 2,
"testCaseCount": 0,
"suiteType": "StaticTestSuite",
"testCasesUrl": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/test/Plans/1/Suites/39/testcases",
"inheritDefaultConfigurations": true,
"state": "InProgress",
"lastUpdatedBy": {
"id": "e5a5f7f8-6507-4c34-b397-6c4818e002f4",
"displayName": "Fabrikam Fiber",
"uniqueName": "fabrikamfiber1@outlook.com",
"url": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/e5a5f7f8-6507-4c34-b397-6c4818e002f4",
"imageUrl": "https://dev.azure.com/fabrikam/_api/_common/identityImage?id=e5a5f7f8-6507-4c34-b397-6c4818e002f4"
},
"lastUpdatedDate": "2014-05-06T14:22:38.683Z"
},
{
"id": 40,
"name": "New query-based suite",
"url": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/test/Plans/1/Suites/40",
"project": {
"id": "eb6e4656-77fc-42a1-9181-4c6d8e9da5d1",
"name": "Fabrikam-Fiber-TFVC",
"url": "https://dev.azure.com/fabrikam/_apis/projects/Fabrikam-Fiber-TFVC"
},
"plan": {
"id": "1",
"name": "sprint1",
"url": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/test/Plans/1"
},
"parent": {
"id": "1",
"name": "sprint1",
"url": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/test/Plans/1/Suites/1"
},
"queryString": "SELECT [System.Id],[System.WorkItemType],[System.Title],[Microsoft.VSTS.Common.Priority],[System.AssignedTo],[System.AreaPath] FROM WorkItems WHERE [System.TeamProject] = @project AND [System.WorkItemType] IN GROUP 'Microsoft.TestCaseCategory' AND [System.AreaPath] UNDER 'Fabrikam-Fiber-TFVC\\Quality assurance'",
"revision": 2,
"testCaseCount": 0,
"suiteType": "DynamicTestSuite",
"testCasesUrl": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/test/Plans/1/Suites/40/testcases",
"inheritDefaultConfigurations": true,
"lastPopulatedDate": "2014-05-06T15:06:16.013Z",
"state": "InProgress",
"lastUpdatedBy": {
"id": "e5a5f7f8-6507-4c34-b397-6c4818e002f4",
"displayName": "Fabrikam Fiber",
"uniqueName": "fabrikamfiber1@outlook.com",
"url": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/e5a5f7f8-6507-4c34-b397-6c4818e002f4",
"imageUrl": "https://dev.azure.com/fabrikam/_api/_common/identityImage?id=e5a5f7f8-6507-4c34-b397-6c4818e002f4"
},
"lastUpdatedDate": "2014-05-06T15:06:16.01Z"
}
],
"count": 7
}
Definitions
Name | Description |
---|---|
Identity |
|
Reference |
The class to represent a collection of REST reference links. |
Shallow |
An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links. |
Test |
Test suite |
IdentityRef
Name | Type | Description |
---|---|---|
_links |
This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. |
|
descriptor |
string |
The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. |
directoryAlias |
string |
|
displayName |
string |
This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. |
id |
string |
|
imageUrl |
string |
|
inactive |
boolean |
|
isAadIdentity |
boolean |
|
isContainer |
boolean |
|
isDeletedInOrigin |
boolean |
|
profileUrl |
string |
|
uniqueName |
string |
|
url |
string |
This url is the full route to the source resource of this graph subject. |
ReferenceLinks
The class to represent a collection of REST reference links.
Name | Type | Description |
---|---|---|
links |
object |
The readonly view of the links. Because Reference links are readonly, we only want to expose them as read only. |
ShallowReference
An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links.
Name | Type | Description |
---|---|---|
id |
string |
ID of the resource |
name |
string |
Name of the linked resource (definition name, controller name, etc.) |
url |
string |
Full http link to the resource |
TestSuite
Test suite
Name | Type | Description |
---|---|---|
areaUri |
string |
Area uri of the test suite. |
children |
Child test suites of current test suite. |
|
defaultConfigurations |
Test suite default configuration. |
|
defaultTesters |
Test suite default testers. |
|
id |
integer |
Id of test suite. |
inheritDefaultConfigurations |
boolean |
Default configuration was inherited or not. |
lastError |
string |
Last error for test suite. |
lastPopulatedDate |
string |
Last populated date. |
lastUpdatedBy |
IdentityRef of user who has updated test suite recently. |
|
lastUpdatedDate |
string |
Last update date. |
name |
string |
Name of test suite. |
parent |
Test suite parent shallow reference. |
|
plan |
Test plan to which the test suite belongs. |
|
project |
Test suite project shallow reference. |
|
queryString |
string |
Test suite query string, for dynamic suites. |
requirementId |
integer |
Test suite requirement id. |
revision |
integer |
Test suite revision. |
state |
string |
State of test suite. |
suiteType |
string |
Test suite type. |
suites |
List of shallow reference of suites. |
|
testCaseCount |
integer |
Test cases count. |
testCasesUrl |
string |
Test case url. |
text |
string |
Used in tree view. If test suite is root suite then, it is name of plan otherwise title of the suite. |
url |
string |
Url of test suite. |
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for