Test Suite Recycle Bin Operations - Get Deleted Test Suites For Plan

获取测试计划的已删除测试套件。

GET https://dev.azure.com/{organization}/{project}/_apis/testplan/recycleBin/TestPlan/{planId}/testsuite?api-version=7.2-preview.1
GET https://dev.azure.com/{organization}/{project}/_apis/testplan/recycleBin/TestPlan/{planId}/testsuite?expand={expand}&continuationToken={continuationToken}&asTreeView={asTreeView}&api-version=7.2-preview.1

URI 参数

名称 必需 类型 说明
organization
path True

string

Azure DevOps 组织的名称。

planId
path True

integer (int32)

请求套件的测试计划的 ID。

project
path True

string

项目 ID 或项目名称

api-version
query True

string

要使用的 API 版本。 这应设置为“7.2-preview.1”才能使用此版本的 API。

asTreeView
query

boolean

如果返回的套件应位于树结构中。

continuationToken
query

string

如果返回的套件列表未完成,则响应标头中包括用于查询下一批套件的延续标记作为“x-ms-continuationtoken”。 省略此参数以获取第一批测试套件。

expand
query

SuiteExpand

包括子套件和测试人员的详细信息。

响应

名称 类型 说明
200 OK

TestSuite[]

成功作

安全性

oauth2

类型: oauth2
流向: accessCode
授权 URL: https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
令牌 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

作用域

名称 说明
vso.test 授予读取测试计划、用例、结果和其他测试管理相关项目的能力。

示例

Get all Deleted Test Suites for a Test Plan.
Get Deleted Test Suites of a Test Plan in Tree View.

Get all Deleted Test Suites for a Test Plan.

示例请求

GET https://dev.azure.com/fabrikam/{project}/_apis/testplan/recycleBin/TestPlan/{planId}/testsuite?expand=Children, DefaultTesters&api-version=7.2-preview.1

示例响应

transfer-Encoding: chunked
persistent-Auth: true
lfs-Authenticate: NTLM
wwW-Authenticate: Negotiate oRswGaADCgEAoxIEEAEAAAB/yMsAtyjkcQAAAAA=
{
  "value": [
    {
      "id": 14,
      "revision": 2,
      "project": {
        "id": "9aa0d72c-e93a-4456-9870-9c5169074a96",
        "name": "p1",
        "url": "https://dev.azure.com/fabrikam/_apis/projects/p1",
        "state": "unchanged",
        "visibility": "unchanged",
        "lastUpdateTime": "0001-01-01T00:00:00"
      },
      "lastUpdatedBy": {
        "displayName": "Fabrikam Fiber",
        "url": "https://vssps.dev.azure.com/fabrikam/Aea08ebc7-105f-4bb2-a36b-f92e0e9de65a/_apis/Identities/0fdbdad8-6afb-6149-9af9-c0a216137d1d",
        "_links": {
          "avatar": {
            "href": "https://dev.azure.com/fabrikam/_apis/GraphProfile/MemberAvatars/msa.OWM2OTQ4NjYtYjFiOS03NTMxLTk4ZTgtN2EwNTk5MGM1MTU0"
          }
        },
        "id": "9c694866-b1b9-6531-98e8-7a05990c5154",
        "uniqueName": "fabrikamfiber1@microsoft.com",
        "imageUrl": "https://dev.azure.com/fabrikam/_apis/GraphProfile/MemberAvatars/msa.OWM2OTQ4NjYtYjFiOS03NTMxLTk4ZTgtN2EwNTk5MGM1MTU0",
        "descriptor": "msa.OWM2OTQ4NjYtYjFiOS03NTMxLTk4ZTgtN2EwNTk5MGM1MTU0"
      },
      "lastUpdatedDate": "2024-09-02T13:14:27.78Z",
      "plan": {
        "id": 12,
        "name": "tp2"
      },
      "_links": {
        "_self": {
          "href": "https://dev.azure.com/fabrikam/p1/_apis/testplan/Plans/12/Suites/14"
        },
        "testCases": {
          "href": "https://dev.azure.com/fabrikam/p1/_apis/testplan/Plans/12/Suites/14/TestCase"
        },
        "testPoints": {
          "href": "https://dev.azure.com/fabrikam/p1/_apis/testplan/Plans/12/Suites/14/TestPoint"
        }
      },
      "suiteType": "staticTestSuite",
      "name": "s2.1",
      "parentSuite": {
        "id": 13,
        "name": "tp2"
      },
      "inheritDefaultConfigurations": true
    },
    {
      "id": 15,
      "revision": 3,
      "project": {
        "id": "9aa0d72c-e93a-4456-9870-9c5169074a96",
        "name": "p1",
        "url": "https://dev.azure.com/fabrikam/_apis/projects/p1",
        "state": "unchanged",
        "visibility": "unchanged",
        "lastUpdateTime": "0001-01-01T00:00:00"
      },
      "lastUpdatedBy": {
        "displayName": "Fabrikam Fiber",
        "url": "https://vssps.dev.azure.com/fabrikam/Aea08ebc7-105f-4bb2-a36b-f92e0e9de65a/_apis/Identities/0fdbdad8-6afb-6149-9af9-c0a216137d1d",
        "_links": {
          "avatar": {
            "href": "https://dev.azure.com/fabrikam/_apis/GraphProfile/MemberAvatars/msa.OWM2OTQ4NjYtYjFiOS03NTMxLTk4ZTgtN2EwNTk5MGM1MTU0"
          }
        },
        "id": "9c694866-b1b9-6531-98e8-7a05990c5154",
        "uniqueName": "fabrikamfiber1@microsoft.com",
        "imageUrl": "https://dev.azure.com/fabrikam/_apis/GraphProfile/MemberAvatars/msa.OWM2OTQ4NjYtYjFiOS03NTMxLTk4ZTgtN2EwNTk5MGM1MTU0",
        "descriptor": "msa.OWM2OTQ4NjYtYjFiOS03NTMxLTk4ZTgtN2EwNTk5MGM1MTU0"
      },
      "lastUpdatedDate": "2024-09-02T11:11:51.193Z",
      "plan": {
        "id": 12,
        "name": "tp2"
      },
      "children": [
        {
          "id": 16,
          "name": "s2.2.1"
        }
      ],
      "hasChildren": true,
      "_links": {
        "_self": {
          "href": "https://dev.azure.com/fabrikam/p1/_apis/testplan/Plans/12/Suites/15"
        },
        "testCases": {
          "href": "https://dev.azure.com/fabrikam/p1/_apis/testplan/Plans/12/Suites/15/TestCase"
        },
        "testPoints": {
          "href": "https://dev.azure.com/fabrikam/p1/_apis/testplan/Plans/12/Suites/15/TestPoint"
        }
      },
      "suiteType": "staticTestSuite",
      "name": "s2.2",
      "parentSuite": {
        "id": 13,
        "name": "tp2"
      },
      "inheritDefaultConfigurations": true
    },
    {
      "id": 16,
      "revision": 2,
      "project": {
        "id": "9aa0d72c-e93a-4456-9870-9c5169074a96",
        "name": "p1",
        "url": "https://dev.azure.com/fabrikam/_apis/projects/p1",
        "state": "unchanged",
        "visibility": "unchanged",
        "lastUpdateTime": "0001-01-01T00:00:00"
      },
      "lastUpdatedBy": {
        "displayName": "Fabrikam Fiber",
        "url": "https://vssps.dev.azure.com/fabrikam/Aea08ebc7-105f-4bb2-a36b-f92e0e9de65a/_apis/Identities/0fdbdad8-6afb-6149-9af9-c0a216137d1d",
        "_links": {
          "avatar": {
            "href": "https://dev.azure.com/fabrikam/_apis/GraphProfile/MemberAvatars/msa.OWM2OTQ4NjYtYjFiOS03NTMxLTk4ZTgtN2EwNTk5MGM1MTU0"
          }
        },
        "id": "9c694866-b1b9-6531-98e8-7a05990c5154",
        "uniqueName": "fabrikamfiber1@microsoft.com",
        "imageUrl": "https://dev.azure.com/fabrikam/_apis/GraphProfile/MemberAvatars/msa.OWM2OTQ4NjYtYjFiOS03NTMxLTk4ZTgtN2EwNTk5MGM1MTU0",
        "descriptor": "msa.OWM2OTQ4NjYtYjFiOS03NTMxLTk4ZTgtN2EwNTk5MGM1MTU0"
      },
      "lastUpdatedDate": "2024-09-02T11:11:51.193Z",
      "plan": {
        "id": 12,
        "name": "tp2"
      },
      "_links": {
        "_self": {
          "href": "https://dev.azure.com/fabrikam/p1/_apis/testplan/Plans/12/Suites/16"
        },
        "testCases": {
          "href": "https://dev.azure.com/fabrikam/p1/_apis/testplan/Plans/12/Suites/16/TestCase"
        },
        "testPoints": {
          "href": "https://dev.azure.com/fabrikam/p1/_apis/testplan/Plans/12/Suites/16/TestPoint"
        }
      },
      "suiteType": "staticTestSuite",
      "name": "s2.2.1",
      "parentSuite": {
        "id": 15,
        "name": "s2.2"
      },
      "inheritDefaultConfigurations": true
    }
  ],
  "count": 3
}

Get Deleted Test Suites of a Test Plan in Tree View.

示例请求

GET https://dev.azure.com/fabrikam/{project}/_apis/testplan/recycleBin/TestPlan/{planId}/testsuite?asTreeView=True&api-version=7.2-preview.1

示例响应

transfer-Encoding: chunked
persistent-Auth: true
lfs-Authenticate: NTLM
wwW-Authenticate: Negotiate oRswGaADCgEAoxIEEAEAAAB/yMsAtyjkcQAAAAA=
{
  "value": [
    {
      "id": 15,
      "revision": 3,
      "project": {
        "id": "9aa0d72c-e93a-4456-9870-9c5169074a96",
        "name": "p1",
        "url": "https://dev.azure.com/fabrikam/_apis/projects/p1",
        "state": "unchanged",
        "visibility": "unchanged",
        "lastUpdateTime": "0001-01-01T00:00:00"
      },
      "lastUpdatedBy": {
        "displayName": "Fabrikam Fiber",
        "url": "https://vssps.dev.azure.com/fabrikam/Aea08ebc7-105f-4bb2-a36b-f92e0e9de65a/_apis/Identities/0fdbdad8-6afb-6149-9af9-c0a216137d1d",
        "_links": {
          "avatar": {
            "href": "https://dev.azure.com/fabrikam/_apis/GraphProfile/MemberAvatars/msa.OWM2OTQ4NjYtYjFiOS03NTMxLTk4ZTgtN2EwNTk5MGM1MTU0"
          }
        },
        "id": "9c694866-b1b9-6531-98e8-7a05990c5154",
        "uniqueName": "fabrikamfiber1@microsoft.com",
        "imageUrl": "https://dev.azure.com/fabrikam/_apis/GraphProfile/MemberAvatars/msa.OWM2OTQ4NjYtYjFiOS03NTMxLTk4ZTgtN2EwNTk5MGM1MTU0",
        "descriptor": "msa.OWM2OTQ4NjYtYjFiOS03NTMxLTk4ZTgtN2EwNTk5MGM1MTU0"
      },
      "lastUpdatedDate": "2024-09-02T11:11:51.193Z",
      "plan": {
        "areaPath": "p1",
        "iteration": "p1",
        "startDate": "2024-09-02T11:10:42.917Z",
        "endDate": "2024-09-09T11:10:42.917Z",
        "rootSuiteId": 13,
        "id": 12,
        "name": "tp2"
      },
      "children": [
        {
          "id": 16,
          "revision": 2,
          "project": {
            "id": "9aa0d72c-e93a-4456-9870-9c5169074a96",
            "name": "p1",
            "url": "https://dev.azure.com/fabrikam/_apis/projects/p1",
            "state": "unchanged",
            "visibility": "unchanged",
            "lastUpdateTime": "0001-01-01T00:00:00"
          },
          "lastUpdatedBy": {
            "displayName": "Fabrikam Fiber",
            "url": "https://vssps.dev.azure.com/fabrikam/Aea08ebc7-105f-4bb2-a36b-f92e0e9de65a/_apis/Identities/0fdbdad8-6afb-6149-9af9-c0a216137d1d",
            "_links": {
              "avatar": {
                "href": "https://dev.azure.com/fabrikam/_apis/GraphProfile/MemberAvatars/msa.OWM2OTQ4NjYtYjFiOS03NTMxLTk4ZTgtN2EwNTk5MGM1MTU0"
              }
            },
            "id": "9c694866-b1b9-6531-98e8-7a05990c5154",
            "uniqueName": "fabrikamfiber1@microsoft.com",
            "imageUrl": "https://dev.azure.com/fabrikam/_apis/GraphProfile/MemberAvatars/msa.OWM2OTQ4NjYtYjFiOS03NTMxLTk4ZTgtN2EwNTk5MGM1MTU0",
            "descriptor": "msa.OWM2OTQ4NjYtYjFiOS03NTMxLTk4ZTgtN2EwNTk5MGM1MTU0"
          },
          "lastUpdatedDate": "2024-09-02T11:11:51.193Z",
          "plan": {
            "id": 12,
            "name": "tp2"
          },
          "_links": {
            "_self": {
              "href": "https://dev.azure.com/fabrikam/p1/_apis/testplan/Plans/12/Suites/16"
            },
            "testCases": {
              "href": "https://dev.azure.com/fabrikam/p1/_apis/testplan/Plans/12/Suites/16/TestCase"
            },
            "testPoints": {
              "href": "https://dev.azure.com/fabrikam/p1/_apis/testplan/Plans/12/Suites/16/TestPoint"
            }
          },
          "suiteType": "staticTestSuite",
          "name": "s2.2.1",
          "parentSuite": {
            "id": 15,
            "name": "s2.2"
          },
          "inheritDefaultConfigurations": true
        }
      ],
      "hasChildren": true,
      "_links": {
        "_self": {
          "href": "https://dev.azure.com/fabrikam/p1/_apis/testplan/Plans/12/Suites/15"
        },
        "testCases": {
          "href": "https://dev.azure.com/fabrikam/p1/_apis/testplan/Plans/12/Suites/15/TestCase"
        },
        "testPoints": {
          "href": "https://dev.azure.com/fabrikam/p1/_apis/testplan/Plans/12/Suites/15/TestPoint"
        }
      },
      "suiteType": "staticTestSuite",
      "name": "s2.2",
      "parentSuite": {
        "id": 13,
        "name": "tp2"
      },
      "inheritDefaultConfigurations": true
    },
    {
      "id": 14,
      "revision": 2,
      "project": {
        "id": "9aa0d72c-e93a-4456-9870-9c5169074a96",
        "name": "p1",
        "url": "https://dev.azure.com/fabrikam/_apis/projects/p1",
        "state": "unchanged",
        "visibility": "unchanged",
        "lastUpdateTime": "0001-01-01T00:00:00"
      },
      "lastUpdatedBy": {
        "displayName": "Fabrikam Fiber",
        "url": "https://vssps.dev.azure.com/fabrikam/Aea08ebc7-105f-4bb2-a36b-f92e0e9de65a/_apis/Identities/0fdbdad8-6afb-6149-9af9-c0a216137d1d",
        "_links": {
          "avatar": {
            "href": "https://dev.azure.com/fabrikam/_apis/GraphProfile/MemberAvatars/msa.OWM2OTQ4NjYtYjFiOS03NTMxLTk4ZTgtN2EwNTk5MGM1MTU0"
          }
        },
        "id": "9c694866-b1b9-6531-98e8-7a05990c5154",
        "uniqueName": "fabrikamfiber1@microsoft.com",
        "imageUrl": "https://dev.azure.com/fabrikam/_apis/GraphProfile/MemberAvatars/msa.OWM2OTQ4NjYtYjFiOS03NTMxLTk4ZTgtN2EwNTk5MGM1MTU0",
        "descriptor": "msa.OWM2OTQ4NjYtYjFiOS03NTMxLTk4ZTgtN2EwNTk5MGM1MTU0"
      },
      "lastUpdatedDate": "2024-09-02T13:14:27.78Z",
      "plan": {
        "areaPath": "p1",
        "iteration": "p1",
        "startDate": "2024-09-02T11:10:42.917Z",
        "endDate": "2024-09-09T11:10:42.917Z",
        "rootSuiteId": 13,
        "id": 12,
        "name": "tp2"
      },
      "_links": {
        "_self": {
          "href": "https://dev.azure.com/fabrikam/p1/_apis/testplan/Plans/12/Suites/14"
        },
        "testCases": {
          "href": "https://dev.azure.com/fabrikam/p1/_apis/testplan/Plans/12/Suites/14/TestCase"
        },
        "testPoints": {
          "href": "https://dev.azure.com/fabrikam/p1/_apis/testplan/Plans/12/Suites/14/TestPoint"
        }
      },
      "suiteType": "staticTestSuite",
      "name": "s2.1",
      "parentSuite": {
        "id": 13,
        "name": "tp2"
      },
      "inheritDefaultConfigurations": true
    }
  ],
  "count": 2
}

定义

名称 说明
IdentityRef
ProjectState

项目状态。

ProjectVisibility

项目可见性。

ReferenceLinks

表示 REST 引用链接集合的类。

SuiteExpand

包括子套件和测试人员的详细信息。

TeamProjectReference

表示对 TeamProject 的浅表引用。

TestConfigurationReference

测试配置参考

TestPlanReference

测试计划参考资源。

TestSuite

测试套件

TestSuiteReference

测试套件参考资源。

TestSuiteType

测试套件类型。

IdentityRef

名称 类型 说明
_links

ReferenceLinks

此字段包含有关图形主题的零个或多个有趣的链接。 可以调用这些链接以获取有关此图形主题的其他关系或更详细的信息。

descriptor

string

描述符是在系统运行时引用图形主题的主要方法。 此字段将唯一标识帐户和组织中的同一图形主题。

directoryAlias

string

已弃用 - 可以通过查询 IdentityRef“_links”字典的“self”条目中引用的 Graph 用户来检索

displayName

string

这是图形主题的非唯一显示名称。 若要更改此字段,必须在源提供程序中更改其值。

id

string

imageUrl

string

已弃用 - 在 IdentityRef“_links”字典的“虚拟形象”条目中可用

inactive

boolean

已弃用 - 可以通过查询 GraphUser“_links”字典的“membershipState”条目中引用的 Graph 成员身份状态来检索

isAadIdentity

boolean

已弃用 - 可以从描述符的主题类型推断(Descriptor.IsAadUserType/Descriptor.IsAadGroupType)

isContainer

boolean

已弃用 - 可以从描述符的主题类型推断(描述符.IsGroupType)

isDeletedInOrigin

boolean

profileUrl

string

已弃用 - 不在 ToIdentityRef 的大多数预先存在的实现中使用

uniqueName

string

已弃用 - 请改用 Domain+PrincipalName

url

string

此 URL 是指向此图形主题的源资源的完整路由。

ProjectState

项目状态。

说明
all

所有项目,无论状态如何,都已删除。

createPending

项目已排队创建,但该过程尚未启动。

deleted

项目已被删除。

deleting

项目正在删除。

new

正在创建项目。

unchanged

项目尚未更改。

wellFormed

项目已完全创建并可供使用。

ProjectVisibility

项目可见性。

说明
private

只有具有显式访问权限的用户才能看到该项目。

public

项目对所有人可见。

表示 REST 引用链接集合的类。

名称 类型 说明
links

object

链接的只读视图。 由于引用链接是只读的,因此我们只想将其公开为只读链接。

SuiteExpand

包括子套件和测试人员的详细信息。

说明
children

在响应中包含子级。

defaultTesters

在响应中包含默认测试人员。

none

不要在输出中包含任何扩展。

TeamProjectReference

表示对 TeamProject 的浅表引用。

名称 类型 说明
abbreviation

string

项目缩写。

defaultTeamImageUrl

string

指向默认团队标识映像的 URL。

description

string

项目的说明(如果有)。

id

string (uuid)

项目标识符。

lastUpdateTime

string (date-time)

上次更新时间的项目。

name

string

项目名称。

revision

integer (int64)

项目修订。

state

ProjectState

项目状态。

url

string

指向对象完整版本的 URL。

visibility

ProjectVisibility

项目可见性。

TestConfigurationReference

测试配置参考

名称 类型 说明
id

integer (int32)

配置的 ID

name

string

配置的名称

TestPlanReference

测试计划参考资源。

名称 类型 说明
id

integer (int32)

测试计划的 ID。

name

string

测试计划的名称。

TestSuite

测试套件

名称 类型 说明
_links

ReferenceLinks

链接:self、testPoints、testCases、parent

children

TestSuite[]

当前测试套件的子测试套件。

defaultConfigurations

TestConfigurationReference[]

测试套件默认配置。

defaultTesters

IdentityRef[]

测试套件默认测试人员。

hasChildren

boolean

如果存在子测试套件,则指示布尔值

id

integer (int32)

测试套件的 ID。

inheritDefaultConfigurations

boolean

默认配置继承或不继承。

lastError

string

测试套件的最后一个错误。

lastPopulatedDate

string (date-time)

上次填充的日期。

lastUpdatedBy

IdentityRef

最近更新了测试套件的用户的 IdentityRef。

lastUpdatedDate

string (date-time)

上次更新日期。

name

string

测试套件的名称。

parentSuite

TestSuiteReference

测试套件父浅层引用。

plan

TestPlanReference

测试套件所属的测试计划。

project

TeamProjectReference

测试套件项目浅表引用。

queryString

string

测试套件查询字符串,适用于动态套件。

requirementId

integer (int32)

测试套件要求 ID。

revision

integer (int32)

测试套件修订。

suiteType

TestSuiteType

测试套件类型。

TestSuiteReference

测试套件参考资源。

名称 类型 说明
id

integer (int32)

测试套件的 ID。

name

string

测试套件的名称。

TestSuiteType

测试套件类型。

说明
dynamicTestSuite

基于查询的测试套件

none

默认套件类型

requirementTestSuite

基于要求的测试套件

staticTestSuite

静态测试套件