共用方式為


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 參數

名稱 位於 必要 類型 Description
organization
path True

string

Azure DevOps 組織的名稱。

project
path True

string

項目識別碼或項目名稱

api-version
query True

string

要使用的 API 版本。 這應該設定為 『7.1』 以使用此版本的 API。

deepClone
query

boolean

複製所有相關聯的測試案例

要求本文

名稱 類型 Description
cloneOptions

CloneOptions

測試計劃複製建立參數

destinationTestPlan

DestinationTestPlanCloneParams

目的地測試計劃的相關信息

sourceTestPlan

SourceTestPlanInfo

來源測試計劃的相關信息

回應

名稱 類型 Description
200 OK

CloneTestPlanOperationInformation

成功作業

安全性

oauth2

類型: oauth2
Flow: 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

範圍

名稱 Description
vso.test_write 授與讀取、建立和更新測試計劃、案例、結果和其他測試管理相關成品的能力。

定義

名稱 Description
BuildDefinitionReference

組建定義參考資源

CloneOperationCommonResponse

複製作業的常見回應

CloneOperationState

複製作業狀態

CloneOptions

複製測試套件的複製選項。

CloneStatistics

複製統計數據詳細數據。

CloneTestPlanOperationInformation

測試計劃複製作業的回應

CloneTestPlanParams

測試計劃複製作業的參數

DestinationTestPlanCloneParams

目的地測試計劃建立參數

IdentityRef
ProjectState

項目狀態。

ProjectVisibility

項目可見度。

ReferenceLinks

表示 REST 參考連結集合的類別。

ReleaseEnvironmentDefinitionReference

發行環境資源的參考。

SourceTestPlanInfo

測試計劃複製作業的來源測試計劃資訊

SourceTestplanResponse

測試計劃複製作業的來源測試計劃回應

TeamProjectReference

表示 TeamProject 的淺層參考。

TestOutcomeSettings

測試結果設定

TestPlan

測試計劃資源。

TestSuiteReference

測試套件參考資源。

BuildDefinitionReference

組建定義參考資源

名稱 類型 Description
id

integer (int32)

組建定義的識別碼

name

string

組建定義的名稱

CloneOperationCommonResponse

複製作業的常見回應

名稱 類型 Description
cloneStatistics

CloneStatistics

與複製作業相關的各種統計數據

completionDate

string (date-time)

作業的完成數據

creationDate

string (date-time)

作業的建立數據

links

ReferenceLinks

參考連結

message

string

與作業相關的訊息

opId

integer (int32)

複製作業標識碼

state

CloneOperationState

複製作業狀態

CloneOperationState

複製作業狀態

Description
failed

失敗狀態的值

inProgress

輸入狀態的值

queued

佇列狀態的值

succeeded

成功狀態的值

CloneOptions

複製測試套件的複製選項。

名稱 類型 Description
cloneRequirements

boolean

如果設定為 true 需求將會複製

copyAllSuites

boolean

從來源方案複製所有套件

copyAncestorHierarchy

boolean

複製上階層

destinationWorkItemType

string

複製的工作項目類型名稱

overrideParameters

object

索引鍵值組,其中索引鍵值會由 值覆寫。

relatedLinkComment

string

將新的複製測試案例連結至原始的 Set null,不加上批注的連結批注

CloneStatistics

複製統計數據詳細數據。

名稱 類型 Description
clonedRequirementsCount

integer (int32)

到目前為止複製的需求數目。

clonedSharedStepsCount

integer (int32)

到目前為止複製的共用步驟數目。

clonedTestCasesCount

integer (int32)

到目前為止複製的測試案例數目

totalRequirementsCount

integer (int32)

要複製的需求總數

totalTestCasesCount

integer (int32)

要複製的測試案例總數

CloneTestPlanOperationInformation

測試計劃複製作業的回應

名稱 類型 Description
cloneOperationResponse

CloneOperationCommonResponse

與複製相關的各種資訊

cloneOptions

CloneOptions

測試計劃複製建立參數

destinationTestPlan

TestPlan

目的地測試計劃的資訊

sourceTestPlan

SourceTestplanResponse

來源測試計劃的資訊

CloneTestPlanParams

測試計劃複製作業的參數

名稱 類型 Description
cloneOptions

CloneOptions

測試計劃複製建立參數

destinationTestPlan

DestinationTestPlanCloneParams

目的地測試計劃的相關信息

sourceTestPlan

SourceTestPlanInfo

來源測試計劃的相關信息

DestinationTestPlanCloneParams

目的地測試計劃建立參數

名稱 類型 Description
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

名稱 類型 Description
_links

ReferenceLinks

此欄位包含圖表主旨的相關零或更多有趣連結。 您可以叫用這些連結,以取得此圖表主題的其他關聯性或更詳細的資訊。

descriptor

string

描述元是在系統執行時參考圖表主旨的主要方式。 此欄位會唯一識別帳戶和組織之間的相同圖表主題。

directoryAlias

string

已淘汰 - 查詢 IdentityRef “_links” 字典中參考的 Graph 使用者,即可擷取

displayName

string

這是圖形主體的非唯一顯示名稱。 若要變更此欄位,您必須在來源提供者中變更其值。

id

string

imageUrl

string

已淘汰 - 可在 IdentityRef “_links” 字典的 “avatar” 專案中取得

inactive

boolean

已淘汰 - 可藉由查詢 GraphUser “_links” 字典的 “membershipState” 專案中參考的 Graph 成員資格狀態來擷取

isAadIdentity

boolean

已淘汰 - 可以從描述元的主體類型推斷 (Descriptor.IsAadUserType/Descriptor.IsAadGroupType)

isContainer

boolean

已淘汰 - 可以從描述元的主體類型推斷 (Descriptor.IsGroupType)

isDeletedInOrigin

boolean

profileUrl

string

已淘汰 - 未在 ToIdentityRef 的大部分預先存在實作中使用

uniqueName

string

已淘汰 - 請改用 Domain+PrincipalName

url

string

此 URL 是此圖表主體來源資源的完整路由。

ProjectState

項目狀態。

Description
all

所有專案,不論狀態為何,但已刪除除外。

createPending

Project 已排入佇列以建立,但程式尚未啟動。

deleted

項目已刪除。

deleting

Project 正在刪除。

new

Project 正在建立中。

unchanged

專案尚未變更。

wellFormed

專案已完全建立並可供使用。

ProjectVisibility

項目可見度。

Description
private

只有具有明確存取權的使用者才能看到專案。

public

所有專案都可以看到。

表示 REST 參考連結集合的類別。

名稱 類型 Description
links

object

連結的只讀檢視。 因為參考連結是只讀的,所以我們只想要將其公開為只讀。

ReleaseEnvironmentDefinitionReference

發行環境資源的參考。

名稱 類型 Description
definitionId

integer (int32)

包含發行環境定義的發行定義識別碼。

environmentDefinitionId

integer (int32)

發行環境定義的標識碼。

SourceTestPlanInfo

測試計劃複製作業的來源測試計劃資訊

名稱 類型 Description
id

integer (int32)

來源測試計劃的標識碼

suiteIds

integer[] (int32)

要複製到來源測試計劃內的套件標識碼

SourceTestplanResponse

測試計劃複製作業的來源測試計劃回應

名稱 類型 Description
id

integer (int32)

測試計劃的標識碼。

name

string

測試計劃的名稱。

project

TeamProjectReference

項目參考

suiteIds

integer[] (int32)

要複製到來源測試計劃內的套件標識碼

TeamProjectReference

表示 TeamProject 的淺層參考。

名稱 類型 Description
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

測試結果設定

名稱 類型 Description
syncOutcomeAcrossSuites

boolean

設定套件間相同測試測試結果如何顯示的值

TestPlan

測試計劃資源。

名稱 類型 Description
_links

ReferenceLinks

相關連結

areaPath

string

測試計劃的區域。

buildDefinition

BuildDefinitionReference

產生與此測試計劃相關聯的組建定義。

buildId

integer (int32)

要測試的組建。

description

string

測試計劃的描述。

endDate

string (date-time)

測試計劃的結束日期。

id

integer (int32)

測試計劃的標識碼。

iteration

string

測試計劃的反覆項目路徑。

name

string

測試計劃的名稱。

owner

IdentityRef

測試計劃的擁有者。

previousBuildId

integer (int32)

與測試計劃相關聯的先前組建標識碼

project

TeamProjectReference

包含測試計劃的專案。

releaseEnvironmentDefinition

ReleaseEnvironmentDefinitionReference

要用來從此測試計劃部署組建和執行自動化測試的版本環境。

revision

integer (int32)

測試計劃的修訂。

rootSuite

TestSuiteReference

測試計劃的根測試套件。

startDate

string (date-time)

測試計劃的開始日期。

state

string

測試計劃的狀態。

testOutcomeSettings

TestOutcomeSettings

在測試計劃下設定測試套件之間相同測試需要運作方式的值

updatedBy

IdentityRef

測試計劃上次更新的身分識別參考

updatedDate

string (date-time)

測試計劃的更新日期

TestSuiteReference

測試套件參考資源。

名稱 類型 Description
id

integer (int32)

測試套件的標識碼。

name

string

測試套件的名稱。