共用方式為


Clone Operation - Get

取得複製資訊。

GET https://dev.azure.com/{organization}/{project}/_apis/test/cloneoperation/{cloneOperationId}?api-version=5.0-preview.2
GET https://dev.azure.com/{organization}/{project}/_apis/test/cloneoperation/{cloneOperationId}?$includeDetails={$includeDetails}&api-version=5.0-preview.2

URI 參數

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

integer

int32

當我們將複製作業排入佇列時傳回的作業識別碼

organization
path True

string

Azure DevOps 組織的名稱。

project
path True

string

專案識別碼或專案名稱

api-version
query True

string

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

$includeDetails
query

boolean

如果 false 只會傳回復製作業資訊的狀態,如果 true 會傳回完整的複製資訊

回應

名稱 類型 Description
200 OK

CloneOperationInformation

成功的作業

安全性

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 授與讀取測試計劃、案例、結果和其他測試管理相關成品的能力。

範例

範例要求

GET https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/test/cloneoperation/{cloneOperationId}?$includeDetails=true&api-version=5.0-preview.2

範例回覆

{
  "opId": 2,
  "creationDate": "2015-12-22T08:41:39.403Z",
  "completionDate": "2015-12-22T08:41:40.49Z",
  "state": "succeeded",
  "message": null,
  "cloneStatistics": {
    "totalTestCasesCount": 7,
    "clonedTestCasesCount": 7,
    "clonedSharedStepsCount": 0,
    "totalRequirementsCount": 0,
    "clonedRequirementsCount": 0
  },
  "resultObjectType": "testPlan",
  "destinationObject": {
    "id": "18",
    "name": "DestinationPlan",
    "url": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc2/_apis/test/Plans/18"
  },
  "sourceObject": {
    "id": "1",
    "name": "TestPlan1",
    "url": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/test/Plans/1"
  },
  "destinationPlan": {
    "id": "18",
    "name": "DestinationPlan",
    "url": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc2/_apis/test/Plans/18"
  },
  "sourcePlan": {
    "id": "1",
    "name": "TestPlan1",
    "url": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/test/Plans/1"
  },
  "destinationProject": {
    "name": "fabrikam-fiber-tfvc2",
    "url": "https://dev.azure.com/fabrikam/_apis/projects/fabrikam-fiber-tfvc2"
  },
  "sourceProject": {
    "name": "fabrikam-fiber-tfvc",
    "url": "https://dev.azure.com/fabrikam/_apis/projects/fabrikam-fiber-tfvc"
  },
  "url": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/test/cloneOperation/2"
}

定義

名稱 Description
CloneOperationInformation

複製作業的詳細資料。

CloneOperationState

作業的目前狀態。 當 State 達到 Suceeded 或 Failed 時,作業就會完成

CloneStatistics
ResultObjectType

複製作業所產生的物件型別

ShallowReference

一些其他資源的抽象參考。 這個類別可用來提供建置資料合約,以統一方式參考其他資源,以提供輕鬆周遊連結的方式。

CloneOperationInformation

複製作業的詳細資料。

名稱 類型 Description
cloneStatistics

CloneStatistics

複製統計資料

completionDate

string

如果作業完成,則為完成的 DateTime。 如果作業未完成,則為 DateTime.MaxValue

creationDate

string

作業啟動時的 DateTime

destinationObject

ShallowReference

目的地的淺層參考

destinationPlan

ShallowReference

目的地的淺層參考

destinationProject

ShallowReference

目的地的淺層參考

message

string

如果作業失敗,訊息會包含失敗的原因。 否則,為 Null。

opId

integer

作業的識別碼

resultObjectType

ResultObjectType

複製作業所產生的物件型別

sourceObject

ShallowReference

來源的淺層參考

sourcePlan

ShallowReference

來源的淺層參考

sourceProject

ShallowReference

來源的淺層參考

state

CloneOperationState

作業的目前狀態。 當 State 達到 Suceeded 或 Failed 時,作業就會完成

url

string

取得複製資訊的 URL

CloneOperationState

作業的目前狀態。 當 State 達到 Suceeded 或 Failed 時,作業就會完成

Description
failed

失敗狀態的值

inProgress

輸入狀態的值

queued

佇列狀態的值

succeeded

成功狀態的值

CloneStatistics

名稱 類型 Description
clonedRequirementsCount

integer

到目前為止複製的「要求」數目。

clonedSharedStepsCount

integer

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

clonedTestCasesCount

integer

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

totalRequirementsCount

integer

要複製的需求總數

totalTestCasesCount

integer

要複製的測試案例總數

ResultObjectType

複製作業所產生的物件型別

Description
testPlan

計畫複製

testSuite

套件複製

ShallowReference

一些其他資源的抽象參考。 這個類別可用來提供建置資料合約,以統一方式參考其他資源,以提供輕鬆周遊連結的方式。

名稱 類型 Description
id

string

資源的識別碼

name

string

連結資源的名稱 (定義名稱、控制器名稱等。)

url

string

資源的完整 HTTP 連結