次の方法で共有


Results - Get

テスト実行のテスト結果を取得します。

GET https://dev.azure.com/{organization}/{project}/_apis/test/Runs/{runId}/results/{testCaseResultId}?api-version=7.1
GET https://dev.azure.com/{organization}/{project}/_apis/test/Runs/{runId}/results/{testCaseResultId}?detailsToInclude={detailsToInclude}&api-version=7.1

URI パラメーター

名前 / 必須 説明
organization
path True

string

Azure DevOps 組織の名前。

project
path True

string

プロジェクト ID またはプロジェクト名

runId
path True

integer (int32)

フェッチするテスト結果のテスト実行 ID。

testCaseResultId
path True

integer (int32)

テスト結果 ID。

api-version
query True

string

使用する API のバージョン。 このバージョンの API を使用するには、これを '7.1' に設定する必要があります。

detailsToInclude
query

ResultDetails

テスト結果に含める詳細。 既定値は None です。 その他の値は、Iterations、WorkItems、SubResults です。

応答

名前 説明
200 OK

TestCaseResult

成功した操作

セキュリティ

oauth2

型: oauth2
フロー: accessCode
Authorization URL (承認 URL): https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
Token URL (トークン 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 テスト計画、ケース、結果、その他のテスト管理関連の成果物を読み取る機能を付与します。

要求のサンプル

GET https://dev.azure.com/fabrikam/Fabrikam-Fiber-TFVC/_apis/test/Runs/16/results/100000?api-version=7.1

応答のサンプル

{
  "id": 100000,
  "project": {
    "id": "5c3d39df-a0cb-49da-be01-42e53792c0e1",
    "name": "Fabrikam-Fiber-TFVC",
    "url": "https://dev.azure.com/fabrikam/_apis/projects/Fabrikam-Fiber-TFVC"
  },
  "startedDate": "2016-07-13T11:12:48.487Z",
  "completedDate": "2016-07-13T11:12:48.493Z",
  "durationInMs": 4,
  "outcome": "Passed",
  "revision": 1,
  "runBy": {
    "id": "a5cbf24d-799f-452e-82be-f049a85b5895",
    "displayName": "Fabrikam",
    "uniqueName": "fabrikamfiber.vsin@hotmail.com",
    "url": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/a5cbf24d-799f-452e-82be-f049a85b5895",
    "imageUrl": "https://dev.azure.com/fabrikam/_api/_common/identityImage?id=a5cbf24d-799f-452e-82be-f049a85b5895"
  },
  "state": "Completed",
  "testCase": {
    "name": "Pass1"
  },
  "testRun": {
    "id": "16",
    "name": "VSTest Test Run release any cpu",
    "url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber-TFVC/_apis/test/Runs/16"
  },
  "lastUpdatedDate": "2016-07-13T11:12:49.123Z",
  "lastUpdatedBy": {
    "id": "375baa5b-5148-4e89-a549-ec202b722d89",
    "displayName": "Project Collection Build Service (fabrikam)",
    "uniqueName": "Build\\78b5727d-4a24-4ec8-9caf-704685572174",
    "url": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/375baa5b-5148-4e89-a549-ec202b722d89",
    "imageUrl": "https://dev.azure.com/fabrikam/_api/_common/identityImage?id=375baa5b-5148-4e89-a549-ec202b722d89"
  },
  "priority": 0,
  "computerName": "TASKAGENT5-0055",
  "build": {
    "id": "5",
    "name": "20160713.2",
    "url": "https://dev.azure.com/fabrikam/_apis/build/Builds/5"
  },
  "createdDate": "2016-07-13T11:12:49.123Z",
  "url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber-TFVC/_apis/test/Runs/16/Results/100000",
  "failureType": "None",
  "automatedTestStorage": "unittestproject1.dll",
  "automatedTestType": "UnitTest",
  "automatedTestTypeId": "13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b",
  "automatedTestId": "aefba017-ab06-be36-6b92-de4e29836f72",
  "area": {
    "id": "37528",
    "name": "Fabrikam-Fiber-TFVC",
    "url": "vstfs:///Classification/Node/ebe8ac79-8d9f-4a5b-8d0a-c3095c81e70e"
  },
  "testCaseTitle": "Pass1",
  "customFields": [],
  "automatedTestName": "UnitTestProject1.UnitTest1.Pass1"
}

定義

名前 説明
BuildReference

ビルドへの参照。

CustomTestField

ユーザー設定フィールド情報。 許可されるキー: 値のペア - ( AttemptId: int value, IsTestResultFlaky: bool)

FailingSince

テスト結果の情報以降に失敗します。

IdentityRef
ReferenceLinks

REST 参照リンクのコレクションを表すクラス。

ReleaseReference

リリースへの参照。

ResultDetails

テスト結果に含める詳細。 既定値は None です。 その他の値は、Iterations、WorkItems、SubResults です。

ResultGroupType
ShallowReference

他のリソースへの抽象化された参照。 このクラスは、リンクを介して簡単にトラバーサルを提供する方法で他のリソースを参照する統一された方法でビルド データ コントラクトを提供するために使用されます。

SharedStepModel

共有ステップ作業項目への参照。

TestActionResultModel

テスト ステップの結果を表します。

TestCaseResult

テスト結果を表します。

TestCaseResultAttachmentModel

テスト イテレーションの添付ファイル情報をテストします。

TestCaseResultIdentifier

テスト結果への参照。

TestIterationDetailsModel

テストイテレーションの結果を表します。

TestResultParameterModel

テスト イテレーションのテスト パラメーター情報。

TestSubResult

テスト結果のサブ結果を表します。

BuildReference

ビルドへの参照。

名前 説明
branchName

string

ブランチ名。

buildSystem

string

ビルド システム。

definitionId

integer (int32)

ビルド定義 ID。

id

integer (int32)

ビルド ID。

number

string

ビルド番号。

repositoryId

string

リポジトリ ID。

uri

string

ビルド URI。

CustomTestField

ユーザー設定フィールド情報。 許可されるキー: 値のペア - ( AttemptId: int value, IsTestResultFlaky: bool)

名前 説明
fieldName

string

フィールド名。

value

object

フィールド値。

FailingSince

テスト結果の情報以降に失敗します。

名前 説明
build

BuildReference

失敗してから参照をビルドします。

date

string (date-time)

失敗からの時間 (UTC)。

release

ReleaseReference

失敗後のリリース参照。

IdentityRef

名前 説明
_links

ReferenceLinks

このフィールドには、グラフの件名に関する興味深いリンクが 0 個以上含まれています。 これらのリンクを呼び出して、このグラフの件名に関する追加のリレーションシップや詳細情報を取得できます。

descriptor

string

記述子は、システムの実行中にグラフの件名を参照する主な方法です。 このフィールドは、アカウントと組織の両方で同じグラフの件名を一意に識別します。

directoryAlias

string

非推奨 - IdentityRef "_links" ディクショナリの "自己" エントリで参照されている Graph ユーザーにクエリを実行することで取得できます

displayName

string

これは、グラフの件名の一意でない表示名です。 このフィールドを変更するには、ソース プロバイダーでその値を変更する必要があります。

id

string

imageUrl

string

非推奨 - IdentityRef "_links" ディクショナリの "アバター" エントリで使用できます

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 は、このグラフの件名のソース リソースへの完全なルートです。

REST 参照リンクのコレクションを表すクラス。

名前 説明
links

object

リンクの読み取りビュー。 参照リンクは読み取り専用であるため、読み取り専用として公開する必要があります。

ReleaseReference

リリースへの参照。

名前 説明
attempt

integer (int32)

リリース試行回数。

creationDate

string (date-time)

リリースの作成日 (UTC)。

definitionId

integer (int32)

リリース定義 ID。

environmentCreationDate

string (date-time)

環境の作成日 (UTC)。

environmentDefinitionId

integer (int32)

リリース環境定義 ID。

environmentDefinitionName

string

リリース環境定義名。

environmentId

integer (int32)

リリース環境 ID。

environmentName

string

リリース環境名。

id

integer (int32)

リリース ID。

name

string

リリース名。

ResultDetails

テスト結果に含める詳細。 既定値は None です。 その他の値は、Iterations、WorkItems、SubResults です。

説明
iterations

テスト結果のテスト イテレーションの詳細。

none

テスト結果のコア フィールド。 コア フィールドには、State、Outcome、Priority、AutomatedTestName、AutomatedTestStorage、Comments、ErrorMessage などが含まれます。

point

テスト結果のポイントと計画の詳細。

subResults

テスト結果のサブ結果。

workItems

テスト結果に関連付けられている作業項目。

ResultGroupType

説明
dataDriven

テスト結果の階層の種類。

generic

階層の種類が不明です。

none

テスト結果のリーフ ノード。

orderedTest

テスト結果の階層の種類。

rerun

テスト結果の階層の種類。

ShallowReference

他のリソースへの抽象化された参照。 このクラスは、リンクを介して簡単にトラバーサルを提供する方法で他のリソースを参照する統一された方法でビルド データ コントラクトを提供するために使用されます。

名前 説明
id

string

リソースの ID

name

string

リンクされたリソースの名前 (定義名、コントローラー名など)

url

string

リソースへの完全な http リンク

SharedStepModel

共有ステップ作業項目への参照。

名前 説明
id

integer (int32)

WorkItem 共有ステップ ID。

revision

integer (int32)

共有ステップの作業項目のリビジョン。

TestActionResultModel

テスト ステップの結果を表します。

名前 説明
actionPath

string

テスト ケース作業項目のテスト ステップのパス識別子。 注: 1) ステップの 8 桁の 16 進形式で表されます。 2) 内部的には、最初のステップのステップ ID 値は 2 から始まり、actionPath = 00000002 ステップ 9、ID = 10、actionPath = 0000000a ステップ 15、ID =16、actionPath = 00000010 3) 共有ステップの actionPath がテスト ケースの親ステップと連結されます。 たとえば、00000003はテスト ステップのアクション パスを表し、00000001は共有ステップのアクション パスを示す0000000300000001の種類になります。

comment

string

結果にコメントを付けます。

completedDate

string (date-time)

実行が完了した時刻 (UTC)。

durationInMs

number (double)

実行時間。

errorMessage

string

結果のエラー メッセージ。

iterationId

integer (int32)

テスト アクションの結果のイテレーション ID。

outcome

string

結果のテスト結果。

sharedStepModel

SharedStepModel

共有ステップ作業項目への参照。

startedDate

string (date-time)

実行が開始された時刻 (UTC)。

stepIdentifier

string

これはテスト ケースのステップ ID です。 共有ステップの場合は、テスト ケースの作業項目の共有ステップのステップ ID です。共有ステップのステップ ID。 例: TestCase 作業項目には、2 つの手順があります。1) 通常のステップ (ID = 1 2) 共有ステップ (ID = 2)。 共有ステップ内: a) Id を持つ標準ステップ = 最初のステップの StepIdentifier の値が 1: "1" 2 番目のステップ: "2;1"

url

string

テスト アクションの結果の URL。 ホスト環境では非推奨です。

TestCaseResult

テスト結果を表します。

名前 説明
afnStripId

integer (int32)

アクション記録のテスト添付ファイル ID。

area

ShallowReference

テストの領域パスへの参照。

associatedBugs

ShallowReference[]

テスト結果にリンクされているバグへの参照。

automatedTestId

string

dll 内のテスト メソッドを表す ID。

automatedTestName

string

実行されたテストの完全修飾名。

automatedTestStorage

string

テストが属するコンテナー。

automatedTestType

string

自動テストの種類。

automatedTestTypeId

string

自動テストの TypeId。

build

ShallowReference

テスト結果に関連付けられたビルドへの浅い参照。

buildReference

BuildReference

テスト結果に関連付けられているビルドへの参照。

comment

string

maxSize= 1000 文字のテスト結果にコメントします。

completedDate

string (date-time)

テスト実行が完了した時刻 (UTC)。 完了日は StartedDate より大きくする必要があります。

computerName

string

テストが実行されたコンピューター名。

configuration

ShallowReference

テスト構成への参照。 「ShallowReference」と入力します。

createdDate

string (date-time)

テスト結果の作成時のタイムスタンプ (UTC)。

customFields

CustomTestField[]

テスト結果の追加プロパティ。

durationInMs

number (double)

テストの実行時間 (ミリ秒単位)。 指定しない場合、値は CompletedDate - StartedDate に設定されます

errorMessage

string

テスト実行中のエラー メッセージ。

failingSince

FailingSince

テスト結果が失敗し始めた場合の情報。

failureType

string

テスト結果の失敗の種類。 有効な値= (既知の問題、新しい問題、回帰、不明、なし)

id

integer (int32)

テスト結果の ID。

iterationDetails

TestIterationDetailsModel[]

手動テストにのみ使用されるテスト イテレーションのテスト結果の詳細。

lastUpdatedBy

IdentityRef

ID の最後に更新されたテスト結果への参照。

lastUpdatedDate

string (date-time)

テスト結果の最終更新日時 (UTC)。

outcome

string

テスト結果のテスト結果。 有効な値 = (Unspecified、None、Passed、Failed、Inconclusive、Timeout、Aborted、Blocked、NotExecuted、Warning、Error、NotApplicable、Paused、InProgress、NotImpacted)

owner

IdentityRef

テスト所有者への参照。

priority

integer (int32)

実行されるテストの優先順位。

project

ShallowReference

チーム プロジェクトへの参照。

release

ShallowReference

テスト結果に関連付けられているリリースへの浅い参照。

releaseReference

ReleaseReference

テスト結果に関連付けられているリリースへの参照。

resetCount

integer (int32)

ResetCount。

resolutionState

string

テスト結果の解決状態。

resolutionStateId

integer (int32)

解決状態の ID。

resultGroupType

ResultGroupType

結果の階層の種類。既定値の None はリーフ ノードを意味します。

revision

integer (int32)

テスト結果のリビジョン番号。

runBy

IdentityRef

テストを実行した ID への参照。

stackTrace

string

maxSize= 1000 文字の Stacktrace。

startedDate

string (date-time)

テスト実行が開始された時刻 (UTC)。

state

string

テスト結果の状態。 TestRunState 型。

subResults

TestSubResult[]

テスト結果内のサブ結果の一覧。ResultGroupType が None でない場合は、対応する型のサブ結果が保持されます。

testCase

ShallowReference

実行されたテストへの参照。

testCaseReferenceId

integer (int32)

テスト結果で使用されるテストの参照 ID。 Type TestResultMetaData

testCaseRevision

integer (int32)

TestCaseRevision 番号。

testCaseTitle

string

テストの名前。

testPlan

ShallowReference

テスト計画のテスト ケース作業項目への参照は、その一部です。

testPoint

ShallowReference

実行されたテスト ポイントへの参照。

testRun

ShallowReference

テスト実行への参照。

testSuite

ShallowReference

テスト スイートのテスト ケースの作業項目への参照は、その一部です。

url

string

テスト結果の URL。

TestCaseResultAttachmentModel

テスト イテレーションの添付ファイル情報をテストします。

名前 説明
actionPath

string

テスト ケースの作業項目のパス識別子のテスト ステップ。

id

integer (int32)

添付ファイル ID。

iterationId

integer (int32)

イテレーション ID。

name

string

添付ファイルの名前。

size

integer (int64)

添付ファイルのサイズ。

url

string

添付ファイルの URL。

TestCaseResultIdentifier

テスト結果への参照。

名前 説明
testResultId

integer (int32)

テスト結果 ID。

testRunId

integer (int32)

テスト実行 ID。

TestIterationDetailsModel

テストイテレーションの結果を表します。

名前 説明
actionResults

TestActionResultModel[]

テスト ステップの結果はイテレーションになります。

attachments

TestCaseResultAttachmentModel[]

テスト イテレーションの結果の添付ファイルへの参照。

comment

string

テストイテレーションの結果にコメントを付けます。

completedDate

string (date-time)

実行が完了した時刻 (UTC)。

durationInMs

number (double)

実行時間。

errorMessage

string

テスト イテレーションの結果の実行中のエラー メッセージ。

id

integer (int32)

テストイテレーションの結果の ID。

outcome

string

テストイテレーションの結果の場合は、結果をテストします。

parameters

TestResultParameterModel[]

イテレーションのパラメーターをテストします。

startedDate

string (date-time)

実行が開始された時刻 (UTC)。

url

string

反復結果をテストする URL。

TestResultParameterModel

テスト イテレーションのテスト パラメーター情報。

名前 説明
actionPath

string

パラメーターが参照されるテスト ステップ パス。

iterationId

integer (int32)

イテレーション ID。

parameterName

string

パラメーターの名前。

stepIdentifier

string

これはテスト ケースのステップ ID です。 共有ステップの場合は、テスト ケースの作業項目の共有ステップのステップ ID です。共有ステップのステップ ID。 例: TestCase 作業項目には、2 つの手順があります。1) 通常のステップ (ID = 1 2) 共有ステップ (ID = 2)。 共有ステップ内: a) Id を持つ標準ステップ = 最初のステップの StepIdentifier の値が 1: "1" 2 番目のステップ: "2;1"

url

string

テスト パラメーターの URL。 ホスト環境では非推奨です。

value

string

パラメーターの値。

TestSubResult

テスト結果のサブ結果を表します。

名前 説明
comment

string

サブ結果にコメントを付けます。

completedDate

string (date-time)

テスト実行が完了した時刻 (UTC)。

computerName

string

テストが実行されたマシン。

configuration

ShallowReference

テスト構成への参照。

customFields

CustomTestField[]

サブ結果の追加プロパティ。

displayName

string

サブ結果の名前。

durationInMs

integer (int64)

テストの実行時間。

errorMessage

string

サブ結果のエラー メッセージ。

id

integer (int32)

サブ結果の ID。

lastUpdatedDate

string (date-time)

結果が最後に更新された時刻 (UTC)。

outcome

string

サブ結果の結果。

parentId

integer (int32)

サブ結果の即時親 ID。

resultGroupType

ResultGroupType

結果の階層の種類。既定値の None はリーフ ノードを意味します。

sequenceId

integer (int32)

サブ結果のインデックス番号。

stackTrace

string

Stacktrace。

startedDate

string (date-time)

テスト実行が開始された時刻 (UTC)。

subResults

TestSubResult[]

サブ結果内のサブ結果の一覧。ResultGroupType が None でない場合は、対応する型のサブ結果が保持されます。

testResult

TestCaseResultIdentifier

テスト結果への参照。

url

string

サブ結果の URL。