Test Plan Clone - Clone Test Plan

克隆测试计划

POST https://dev.azure.com/{organization}/{project}/_apis/testplan/Plans/CloneOperation?api-version=7.1
POST https://dev.azure.com/{organization}/{project}/_apis/testplan/Plans/CloneOperation?deepClone={deepClone}&api-version=7.1

URI 参数

名称 必需 类型 说明
organization
path True

string

Azure DevOps 组织的名称。

project
path True

string

项目 ID 或项目名称

api-version
query True

string

要使用的 API 版本。 这应设置为“7.1”才能使用此版本的 API。

deepClone
query

boolean

克隆所有关联的测试用例

请求正文

名称 类型 说明
cloneOptions

CloneOptions

测试计划克隆创建参数

destinationTestPlan

DestinationTestPlanCloneParams

有关目标测试计划的信息

sourceTestPlan

SourceTestPlanInfo

有关源测试计划的信息

响应

名称 类型 说明
200 OK

CloneTestPlanOperationInformation

成功作

安全性

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_write 授予读取、创建和更新测试计划、事例、结果和其他测试管理相关项目的能力。

定义

名称 说明
BuildDefinitionReference

生成定义参考资源

CloneOperationCommonResponse

克隆作的常见响应

CloneOperationState

克隆作状态

CloneOptions

克隆用于克隆测试套件的选项。

CloneStatistics

克隆统计信息详细信息。

CloneTestPlanOperationInformation

测试计划克隆作的响应

CloneTestPlanParams

测试计划克隆作的参数

DestinationTestPlanCloneParams

目标测试计划创建参数

IdentityRef
ProjectState

项目状态。

ProjectVisibility

项目可见性。

ReferenceLinks

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

ReleaseEnvironmentDefinitionReference

对发布环境资源的引用。

SourceTestPlanInfo

测试计划克隆作的源测试计划信息

SourceTestplanResponse

测试计划克隆作的源测试计划响应

TeamProjectReference

表示对 TeamProject 的浅表引用。

TestOutcomeSettings

测试结果设置

TestPlan

测试计划资源。

TestSuiteReference

测试套件参考资源。

BuildDefinitionReference

生成定义参考资源

名称 类型 说明
id

integer (int32)

生成定义的 ID

name

string

生成定义的名称

CloneOperationCommonResponse

克隆作的常见响应

名称 类型 说明
cloneStatistics

CloneStatistics

与克隆作相关的各种统计信息

completionDate

string (date-time)

作的完成数据

creationDate

string (date-time)

作的创建数据

links

ReferenceLinks

参考链接

message

string

与作业相关的消息

opId

integer (int32)

克隆作 ID

state

CloneOperationState

克隆作状态

CloneOperationState

克隆作状态

说明
failed

失败状态的值

inProgress

Inprogress 状态的值

queued

排队状态的值

succeeded

成功状态的值

CloneOptions

克隆用于克隆测试套件的选项。

名称 类型 说明
cloneRequirements

boolean

如果设置为 true 要求,将克隆

copyAllSuites

boolean

从源计划复制所有套件

copyAncestorHierarchy

boolean

复制上级层次结构

destinationWorkItemType

string

克隆的工作项类型的名称

overrideParameters

object

键值对,其中键值被值重写。

relatedLinkComment

string

对将新克隆测试用例链接到原始 Set null 的链接的注释,不带注释

CloneStatistics

克隆统计信息详细信息。

名称 类型 说明
clonedRequirementsCount

integer (int32)

到目前为止克隆的要求数。

clonedSharedStepsCount

integer (int32)

到目前为止克隆的共享步骤数。

clonedTestCasesCount

integer (int32)

到目前为止克隆的测试用例数

totalRequirementsCount

integer (int32)

要克隆的要求总数

totalTestCasesCount

integer (int32)

要克隆的测试用例总数

CloneTestPlanOperationInformation

测试计划克隆作的响应

名称 类型 说明
cloneOperationResponse

CloneOperationCommonResponse

与克隆相关的各种信息

cloneOptions

CloneOptions

测试计划克隆创建参数

destinationTestPlan

TestPlan

目标测试计划的信息

sourceTestPlan

SourceTestplanResponse

源测试计划的信息

CloneTestPlanParams

测试计划克隆作的参数

名称 类型 说明
cloneOptions

CloneOptions

测试计划克隆创建参数

destinationTestPlan

DestinationTestPlanCloneParams

有关目标测试计划的信息

sourceTestPlan

SourceTestPlanInfo

有关源测试计划的信息

DestinationTestPlanCloneParams

目标测试计划创建参数

名称 类型 说明
areaPath

string

测试计划的区域。

buildDefinition

BuildDefinitionReference

生成与此测试计划关联的生成定义的生成。

buildId

integer (int32)

要测试的生成。

description

string

测试计划的说明。

endDate

string (date-time)

测试计划的结束日期。

iteration

string

测试计划的迭代路径。

name

string

测试计划的名称。

owner

IdentityRef

测试计划的所有者。

project

string

目标项目名称

releaseEnvironmentDefinition

ReleaseEnvironmentDefinitionReference

要用于部署生成并从此测试计划运行自动测试的发布环境。

startDate

string (date-time)

测试计划的开始日期。

state

string

测试计划的状态。

testOutcomeSettings

TestOutcomeSettings

在测试计划下配置跨测试套件的相同测试需要的行为的值

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

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

ReleaseEnvironmentDefinitionReference

对发布环境资源的引用。

名称 类型 说明
definitionId

integer (int32)

包含发布环境定义的发布定义的 ID。

environmentDefinitionId

integer (int32)

发布环境定义的 ID。

SourceTestPlanInfo

测试计划克隆作的源测试计划信息

名称 类型 说明
id

integer (int32)

源测试计划的 ID

suiteIds

integer[] (int32)

要克隆到源测试计划内的套件的 ID

SourceTestplanResponse

测试计划克隆作的源测试计划响应

名称 类型 说明
id

integer (int32)

测试计划的 ID。

name

string

测试计划的名称。

project

TeamProjectReference

项目参考

suiteIds

integer[] (int32)

要克隆到源测试计划内的套件的 ID

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

项目可见性。

TestOutcomeSettings

测试结果设置

名称 类型 说明
syncOutcomeAcrossSuites

boolean

用于配置跨套件的相同测试的测试结果如何显示的值

TestPlan

测试计划资源。

名称 类型 说明
_links

ReferenceLinks

相关链接

areaPath

string

测试计划的区域。

buildDefinition

BuildDefinitionReference

生成与此测试计划关联的生成定义的生成。

buildId

integer (int32)

要测试的生成。

description

string

测试计划的说明。

endDate

string (date-time)

测试计划的结束日期。

id

integer (int32)

测试计划的 ID。

iteration

string

测试计划的迭代路径。

name

string

测试计划的名称。

owner

IdentityRef

测试计划的所有者。

previousBuildId

integer (int32)

与测试计划关联的上一个生成 ID

project

TeamProjectReference

包含测试计划的项目。

releaseEnvironmentDefinition

ReleaseEnvironmentDefinitionReference

要用于部署生成并从此测试计划运行自动测试的发布环境。

revision

integer (int32)

测试计划的修订。

rootSuite

TestSuiteReference

测试计划的根测试套件。

startDate

string (date-time)

测试计划的开始日期。

state

string

测试计划的状态。

testOutcomeSettings

TestOutcomeSettings

在测试计划下配置跨测试套件的相同测试需要的行为的值

updatedBy

IdentityRef

测试计划的上次更新的标识参考

updatedDate

string (date-time)

测试计划的更新日期

TestSuiteReference

测试套件参考资源。

名称 类型 说明
id

integer (int32)

测试套件的 ID。

name

string

测试套件的名称。