Results - List

获取测试运行的测试结果。

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

URI 参数

名称 必需 类型 说明
organization
path True

string

Azure DevOps 组织的名称。

project
path True

string

项目 ID 或项目名称

runId
path True

integer (int32)

要提取的测试结果的测试运行 ID。

api-version
query True

string

要使用的 API 版本。 这应设置为“7.1”才能使用此版本的 API。

$skip
query

integer (int32)

要从头开始跳过的测试结果数。

$top
query

integer (int32)

要返回的测试结果数。 如果 detailsToInclude 为 None,则最大值为 1000;否则为 200。

detailsToInclude
query

ResultDetails

要包含在测试结果中的详细信息。 默认值为 None。 其他值为 Iterations 和 WorkItems。

outcomes
query

string (array (TestOutcome))

逗号分隔的测试结果列表以筛选测试结果。

响应

名称 类型 说明
200 OK

TestCaseResult[]

成功作

安全性

oauth2

类型: oauth2
流向: 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

作用域

名称 说明
vso.test 授予读取测试计划、用例、结果和其他测试管理相关项目的能力。

示例

Get a list of test results
With test iterations and workitem details
With workitem details

Get a list of test results

示例请求

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

示例响应

{
  "count": 3,
  "value": [
    {
      "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://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"
    },
    {
      "id": 100001,
      "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.547Z",
      "completedDate": "2016-07-13T11:12:48.62Z",
      "durationInMs": 74,
      "outcome": "Failed",
      "revision": 1,
      "runBy": {
        "id": "a5cbf24d-799f-452e-82be-f049a85b5895",
        "displayName": "Fabrikam-Fiber-TFVC",
        "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": "Fail1"
      },
      "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": 10,
      "computerName": "TASKAGENT5-0055",
      "build": {
        "id": "5",
        "name": "20160713.2",
        "url": "https://dev.azure.com/fabrikam/_apis/build/Builds/5"
      },
      "errorMessage": "Assert.Fail failed. ",
      "createdDate": "2016-07-13T11:12:49.123Z",
      "url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber-TFVC/_apis/test/Runs/16/Results/100001",
      "failureType": "None",
      "automatedTestStorage": "unittestproject1.dll",
      "automatedTestType": "UnitTest",
      "automatedTestTypeId": "13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b",
      "automatedTestId": "7c66fbda-2d0e-a714-e18d-83c0464019a5",
      "area": {
        "id": "37528",
        "name": "Fabrikam-Fiber-TFVC",
        "url": "vstfs:///Classification/Node/ebe8ac79-8d9f-4a5b-8d0a-c3095c81e70e"
      },
      "testCaseTitle": "Fail1",
      "stackTrace": "   at UnitTestProject1.UnitTest1.Fail1() in C:\\a\\1\\s\\UnitTestProject1\\UnitTestProject1\\UnitTest1.cs:line 20\r\n",
      "customFields": [],
      "failingSince": {
        "date": "2016-07-13T11:11:17.587Z",
        "build": {
          "id": 4,
          "definitionId": 0,
          "number": "20160713.1",
          "buildSystem": "Azure DevOps Services"
        }
      },
      "automatedTestName": "UnitTestProject1.UnitTest1.Fail1"
    },
    {
      "id": 100002,
      "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.623Z",
      "completedDate": "2016-07-13T11:12:48.623Z",
      "outcome": "NotExecuted",
      "revision": 1,
      "runBy": {
        "id": "a5cbf24d-799f-452e-82be-f049a85b5895",
        "displayName": "Fabrikam-Fiber-TFVC",
        "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": "Ignore1"
      },
      "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": 20,
      "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/100002",
      "failureType": "None",
      "automatedTestStorage": "unittestproject1.dll",
      "automatedTestType": "UnitTest",
      "automatedTestTypeId": "13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b",
      "automatedTestId": "ef9123e0-a097-7e9b-9a02-f526c7a640c0",
      "area": {
        "id": "37528",
        "name": "Fabrikam-Fiber-TFVC",
        "url": "vstfs:///Classification/Node/ebe8ac79-8d9f-4a5b-8d0a-c3095c81e70e"
      },
      "testCaseTitle": "Ignore1",
      "customFields": [],
      "automatedTestName": "UnitTestProject1.UnitTest1.Ignore1"
    }
  ]
}

With test iterations and workitem details

示例请求

GET https://dev.azure.com/fabrikam/Fabrikam-Fiber-TFVC/_apis/test/Runs/31/results?detailsToInclude=WorkItems,Iterations&$top=100&api-version=7.1

示例响应

{
  "count": 1,
  "value": [
    {
      "id": 100000,
      "configuration": {
        "id": "4",
        "name": "Windows 8"
      },
      "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-26T04:22:53.273Z",
      "completedDate": "2016-07-26T04:22:56.953Z",
      "durationInMs": 2439,
      "outcome": "Failed",
      "owner": {
        "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"
      },
      "revision": 4,
      "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": {
        "id": "33",
        "name": "TestCase1"
      },
      "testRun": {
        "id": "31",
        "name": "Plan1 (Manual)",
        "url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber-TFVC/_apis/test/Runs/31"
      },
      "lastUpdatedDate": "2016-07-26T04:23:11.553Z",
      "lastUpdatedBy": {
        "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"
      },
      "priority": 2,
      "createdDate": "2016-07-26T04:22:51.8Z",
      "iterationDetails": [
        {
          "id": 1,
          "outcome": "Failed",
          "errorMessage": "",
          "startedDate": "2016-07-26T04:22:54.517Z",
          "completedDate": "2016-07-26T04:22:56.953Z",
          "durationInMs": 2439,
          "actionResults": [
            {
              "actionPath": "00000002",
              "iterationId": 1,
              "url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber-TFVC/_apis/test/Runs/31/Results/100000/Iterations/1/ActionResults/00000002",
              "outcome": "Failed",
              "startedDate": "2016-07-26T04:22:54Z",
              "completedDate": "2016-07-26T04:22:54Z"
            }
          ],
          "parameters": [],
          "attachments": [],
          "url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber-TFVC/_apis/test/Runs/31/Results/100000/Iterations/1"
        }
      ],
      "associatedBugs": [
        {
          "id": "34",
          "name": "This step should pass.",
          "url": ""
        }
      ],
      "url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber-TFVC/_apis/test/Runs/31/Results/100000",
      "failureType": "None",
      "area": {
        "id": "37528",
        "name": "Fabrikam-Fiber-TFVC",
        "url": "vstfs:///Classification/Node/ebe8ac79-8d9f-4a5b-8d0a-c3095c81e70e"
      },
      "testCaseTitle": "TestCase1",
      "customFields": []
    }
  ]
}

With workitem details

示例请求

GET https://dev.azure.com/fabrikam/Fabrikam-Fiber-TFVC/_apis/test/Runs/26/results?detailsToInclude=WorkItems&$top=100&api-version=7.1

示例响应

{
  "count": 2,
  "value": [
    {
      "id": 100000,
      "comment": "Website theme is looking good",
      "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-14T09:38:29.127Z",
      "completedDate": "2016-07-14T09:38:29.127Z",
      "outcome": "Passed",
      "revision": 2,
      "state": "Completed",
      "testCase": {
        "name": "VerifyWebsiteTheme"
      },
      "testRun": {
        "id": "26",
        "name": "Fabrikam Fiber test run ",
        "url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber-TFVC/_apis/test/Runs/26"
      },
      "lastUpdatedDate": "2016-07-14T09:38:28.94Z",
      "lastUpdatedBy": {
        "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"
      },
      "priority": 0,
      "createdDate": "2016-07-14T09:38:28.34Z",
      "associatedBugs": [
        {
          "id": "30",
          "name": "Bug for test VerifyWebsiteLinks",
          "url": ""
        }
      ],
      "url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber-TFVC/_apis/test/Runs/26/Results/100000",
      "failureType": "None",
      "area": {
        "id": "37528",
        "name": "Fabrikam-Fiber-TFVC",
        "url": "vstfs:///Classification/Node/ebe8ac79-8d9f-4a5b-8d0a-c3095c81e70e"
      },
      "testCaseTitle": "VerifyWebsiteTheme",
      "customFields": [],
      "automatedTestName": "FabrikamFiber.WebSite.TestClass.VerifyWebsiteTheme"
    },
    {
      "id": 100001,
      "comment": "Website links are failing because of incorrect container id",
      "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-14T09:38:29.127Z",
      "completedDate": "2016-07-14T09:38:29.127Z",
      "outcome": "Failed",
      "revision": 2,
      "state": "Completed",
      "testCase": {
        "name": "VerifyWebsiteLinks"
      },
      "testRun": {
        "id": "26",
        "name": "Fabrikam Fiber test run ",
        "url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber-TFVC/_apis/test/Runs/26"
      },
      "lastUpdatedDate": "2016-07-14T09:38:28.94Z",
      "lastUpdatedBy": {
        "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"
      },
      "priority": 0,
      "createdDate": "2016-07-14T09:38:28.34Z",
      "associatedBugs": [
        {
          "id": "30",
          "name": "Bug for test VerifyWebsiteLinks",
          "url": ""
        }
      ],
      "url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber-TFVC/_apis/test/Runs/26/Results/100001",
      "failureType": "Known Issue",
      "area": {
        "id": "37528",
        "name": "Fabrikam-Fiber-TFVC",
        "url": "vstfs:///Classification/Node/ebe8ac79-8d9f-4a5b-8d0a-c3095c81e70e"
      },
      "testCaseTitle": "VerifyWebsiteLinks",
      "customFields": [],
      "automatedTestName": "FabrikamFiber.WebSite.TestClass.VerifyWebsiteLinks"
    }
  ]
}

定义

名称 说明
BuildReference

对生成的引用。

CustomTestField

自定义字段信息。 允许的键:值对 - (AttemptId: int 值,IsTestResultFlaky: bool)

FailingSince

由于测试结果的信息失败。

IdentityRef
ReferenceLinks

表示 REST 引用链接集合的类。

ReleaseReference

对发布的引用。

ResultDetails

要包含在测试结果中的详细信息。 默认值为 None。 其他值为 Iterations 和 WorkItems。

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 值,IsTestResultFlaky: bool)

名称 类型 说明
fieldName

string

字段名称。

value

object

字段值。

FailingSince

由于测试结果的信息失败。

名称 类型 说明
build

BuildReference

生成引用失败。

date

string (date-time)

自失败(UTC)以来的时间。

release

ReleaseReference

发布引用自失败以来。

IdentityRef

名称 类型 说明
_links

ReferenceLinks

此字段包含有关图形主题的零个或多个有趣的链接。 可以调用这些链接以获取有关此图形主题的其他关系或更详细的信息。

descriptor

string

描述符是在系统运行时引用图形主题的主要方法。 此字段将唯一标识帐户和组织中的同一图形主题。

directoryAlias

string

已弃用 - 可以通过查询 IdentityRef“_links”字典的“self”条目中引用的 Graph 用户来检索

displayName

string

这是图形主题的非唯一显示名称。 若要更改此字段,必须在源提供程序中更改其值。

id

string

imageUrl

string

已弃用 - 在 IdentityRef“_links”字典的“虚拟形象”条目中可用

inactive

boolean

已弃用 - 可以通过查询 GraphUser“_links”字典的“membershipState”条目中引用的 Graph 成员身份状态来检索

isAadIdentity

boolean

已弃用 - 可以从描述符的主题类型推断(Descriptor.IsAadUserType/Descriptor.IsAadGroupType)

isContainer

boolean

已弃用 - 可以从描述符的主题类型推断(描述符.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。

说明
iterations

测试结果中的测试迭代详细信息。

none

测试结果的核心字段。 核心字段包括 State、Outcome、Priority、AutomateTestName、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 位数字。 2) 在内部,第一步的步骤 ID 值以 2 开头,因此 actionPath = 00000002步骤 9,ID = 10,actionPath = 0000000a 步骤 15 将具有 ID =16,actionPath = 00000010 3) 共享步骤的 actionPath 与测试用例的父步骤连接。 例如,它是一种类型 - 0000000300000001其中00000003表示测试步骤的作路径,00000001表示共享步骤的作路径

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 workitem 有两个步骤:1) ID 为 1 2 的普通步骤, Id 为 2 的共享步骤。 在共享步骤中:a) ID 为 1 的普通步骤:第一步的 StepIdentifier 值为 1:“1”第二步:“2;1"

url

string

测试作结果的 URL。 在托管环境中弃用。

TestCaseResult

表示测试结果。

名称 类型 说明
afnStripId

integer (int32)

测试作录制的附件 ID。

area

ShallowReference

对测试的区域路径的引用。

associatedBugs

ShallowReference[]

对链接到测试结果的 bug 的引用。

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

对上次更新的测试结果的标识的引用。

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

对标识的引用执行了测试。

stackTrace

string

具有 maxSize= 1000 chars 的 Stacktrace。

startedDate

string (date-time)

测试执行开始的时间(UTC)。

state

string

测试结果的状态。 键入 TestRunState。

subResults

TestSubResult[]

测试结果中的子结果列表(如果 ResultGroupType 不是 None,则它包含相应的类型子结果)。

testCase

ShallowReference

对执行的测试的引用。

testCaseReferenceId

integer (int32)

测试结果使用的测试的引用 ID。 类型 TestResultMetaData

testCaseRevision

integer (int32)

TestCaseRevision Number。

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 workitem 有两个步骤:1) ID 为 1 2 的普通步骤, Id 为 2 的共享步骤。 在共享步骤中:a) ID 为 1 的普通步骤:第一步的 StepIdentifier 值为 1:“1”第二步:“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。