共用方式為


Test Plan Clone - Clone Test Plan

複製測試計劃

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

URI 參數

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

string

Azure DevOps 組織的名稱。

project
path True

string

專案識別碼或專案名稱

api-version
query True

string

要使用的 API 版本。 這應該設定為 '7.1-preview.2',以使用此版本的 API。

deepClone
query

boolean

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

要求本文

名稱 類型 Description
cloneOptions

CloneOptions

測試計劃複製建立參數

destinationTestPlan

DestinationTestPlanCloneParams

目的地測試計劃的相關資訊

sourceTestPlan

SourceTestPlanInfo

來源測試計劃的相關資訊

回應

名稱 類型 Description
200 OK

CloneTestPlanOperationInformation

成功作業

安全性

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

名稱 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

組建定義的識別碼

name

string

組建定義的名稱

CloneOperationCommonResponse

複製作業的常見回應

名稱 類型 Description
cloneStatistics

CloneStatistics

與複製作業相關的各種統計資料

completionDate

string

作業的完成資料

creationDate

string

作業的建立資料

links

ReferenceLinks

參考連結

message

string

與作業相關的訊息

opId

integer

複製作業識別碼

state

CloneOperationState

複製作業狀態

CloneOperationState

複製作業狀態

名稱 類型 Description
failed

string

失敗狀態的值

inProgress

string

輸入狀態的值

queued

string

佇列狀態的值

succeeded

string

成功狀態的值

CloneOptions

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

名稱 類型 Description
cloneRequirements

boolean

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

copyAllSuites

boolean

從來源方案複製所有套件

copyAncestorHierarchy

boolean

複製上階階層

destinationWorkItemType

string

複製的工作專案類型名稱

overrideParameters

object

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

relatedLinkComment

string

將新複製測試案例連結至原始 Set null 的連結批註,以無批註顯示

CloneStatistics

複製統計資料詳細資料。

名稱 類型 Description
clonedRequirementsCount

integer

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

clonedSharedStepsCount

integer

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

clonedTestCasesCount

integer

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

totalRequirementsCount

integer

要複製的需求總數

totalTestCasesCount

integer

要複製的測試案例總數

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

要測試的組建。

description

string

測試計劃的描述。

endDate

string

測試計劃的結束日期。

iteration

string

測試計劃的反復專案路徑。

name

string

測試計劃的名稱。

owner

IdentityRef

測試計劃的擁有者。

project

string

目的地專案名稱

releaseEnvironmentDefinition

ReleaseEnvironmentDefinitionReference

用來從此測試計劃部署及執行自動化測試的發行環境。

startDate

string

測試計劃的開始日期。

state

string

測試計劃的狀態。

testOutcomeSettings

TestOutcomeSettings

設定測試計劃下測試套件之間相同測試的行為值

IdentityRef

名稱 類型 Description
_links

ReferenceLinks

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

descriptor

string

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

directoryAlias

string

已淘汰 - 藉由查詢 IdentityRef 「_links」 字典之 「self」 專案中參考的 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

string

所有專案,不論刪除以外的狀態為何。

createPending

string

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

deleted

string

專案已刪除。

deleting

string

Project 正在刪除。

new

string

Project 正在建立中。

unchanged

string

專案尚未變更。

wellFormed

string

Project 已完全建立並可供使用。

ProjectVisibility

專案可見度。

名稱 類型 Description
private

string

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

public

string

專案對全部可見。

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

名稱 類型 Description
links

object

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

ReleaseEnvironmentDefinitionReference

發行環境資源的參考。

名稱 類型 Description
definitionId

integer

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

environmentDefinitionId

integer

發行環境定義的識別碼。

SourceTestPlanInfo

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

名稱 類型 Description
id

integer

來源測試計劃的識別碼

suiteIds

integer[]

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

SourceTestplanResponse

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

名稱 類型 Description
id

integer

測試計劃的識別碼。

name

string

測試計劃的名稱。

project

TeamProjectReference

專案參考

suiteIds

integer[]

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

TeamProjectReference

表示 TeamProject 的淺層參考。

名稱 類型 Description
abbreviation

string

專案縮寫。

defaultTeamImageUrl

string

預設小組身分識別影像的 URL。

description

string

如果有任何) ,專案的描述 (。

id

string

專案識別碼。

lastUpdateTime

string

專案上次更新時間。

name

string

專案名稱。

revision

integer

專案修訂。

state

ProjectState

專案狀態。

url

string

物件完整版本的 URL。

visibility

ProjectVisibility

專案可見度。

TestOutcomeSettings

測試結果設定

名稱 類型 Description
syncOutcomeAcrossSuites

boolean

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

TestPlan

測試計劃資源。

名稱 類型 Description
_links

ReferenceLinks

相關連結

areaPath

string

測試計劃的區域。

buildDefinition

BuildDefinitionReference

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

buildId

integer

要測試的組建。

description

string

測試計劃的描述。

endDate

string

測試計劃的結束日期。

id

integer

測試計劃的識別碼。

iteration

string

測試計劃的反復專案路徑。

name

string

測試計劃的名稱。

owner

IdentityRef

測試計劃的擁有者。

previousBuildId

integer

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

project

TeamProjectReference

包含測試計劃的專案。

releaseEnvironmentDefinition

ReleaseEnvironmentDefinitionReference

用來從此測試計劃部署及執行自動化測試的發行環境。

revision

integer

測試計劃的修訂。

rootSuite

TestSuiteReference

測試計劃的根測試套件。

startDate

string

測試計劃的開始日期。

state

string

測試計劃的狀態。

testOutcomeSettings

TestOutcomeSettings

設定測試計劃下測試套件之間相同測試的行為值

updatedBy

IdentityRef

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

updatedDate

string

測試計劃的更新日期

TestSuiteReference

測試套件參考資源。

名稱 類型 Description
id

integer

測試套件的識別碼。

name

string

測試套件的名稱。