Share via


Result Meta Data - Update

更新測試結果中繼資料的屬性

PATCH https://vstmr.dev.azure.com/{organization}/{project}/_apis/testresults/results/resultmetadata/{testCaseReferenceId}?api-version=7.1-preview.4

URI 參數

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

string

Azure DevOps 組織的名稱。

project
path True

string

專案識別碼或專案名稱

testCaseReferenceId
path True

integer

int32

要更新之測試結果的 TestCaseReference 識別碼。

api-version
query True

string

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

要求本文

名稱 類型 Description
flakyIdentifiers

TestFlakyIdentifier[]

Flaky 識別碼清單

回應

名稱 類型 Description
200 OK

TestResultMetaData

成功的作業

安全性

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

範例

Update test result metadata

Sample Request

PATCH https://vstmr.dev.azure.com/fabrikam/Fabrikam/_apis/testresults/results/resultmetadata/1?api-version=7.1-preview.4

{
  "flakyIdentifiers": [
    {
      "branchName": "refs/heads/master",
      "isFlaky": true
    }
  ]
}

Sample Response

{
  "testCaseReferenceId": 1,
  "priority": 0
}

定義

名稱 Description
TestFlakyIdentifier

測試 Flaky 識別碼

TestResultMetaData

表示測試結果的中繼資料。

TestResultMetaDataUpdateInput

代表 TestResultMetaData 輸入

TestFlakyIdentifier

測試 Flaky 識別碼

名稱 類型 Description
branchName

string

Flakiness 必須標示/未標示的分支名稱

isFlaky

boolean

Flakiness 的狀態

TestResultMetaData

表示測試結果的中繼資料。

名稱 類型 Description
automatedTestName

string

測試結果的 AutomatedTestName。

automatedTestStorage

string

測試結果的 AutomatedTestStorage。

flakyIdentifiers

TestFlakyIdentifier[]

TestCaseReferenceId 的 Flaky 識別碼清單

owner

string

測試結果的擁有者。

priority

integer

測試結果的優先順序。

testCaseReferenceId

integer

TestCaseReference 的識別碼。

testCaseTitle

string

測試結果的 TestCaseTitle。

TestResultMetaDataUpdateInput

代表 TestResultMetaData 輸入

名稱 類型 Description
flakyIdentifiers

TestFlakyIdentifier[]

Flaky 識別碼清單