History - Query
POST https://vstmr.dev.azure.com/{organization}/{project}/_apis/testresults/results/history?api-version=7.1-preview.1
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
organization
|
path | True |
string |
Azure DevOps 组织的名称。 |
project
|
path | True |
string |
项目 ID 或项目名称 |
api-version
|
query | True |
string |
要使用的 API 版本。 应将其设置为“7.1-preview.1”才能使用此版本的 API。 |
请求正文
名称 | 类型 | 说明 |
---|---|---|
automatedTestName |
string |
|
branch |
string |
|
executedIn | ||
groupBy |
string |
|
maxCompleteDate |
string |
|
resultsCount |
integer |
|
testCaseId |
integer |
|
testCaseReferenceIds |
integer[] |
|
testPlanId |
integer |
|
testPointIds |
integer[] |
|
testResultsContext | ||
trendDays |
integer |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
成功的操作 |
安全性
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_write | 授予读取、创建和更新测试计划、案例、结果和其他测试管理相关项目的能力。 |
定义
名称 | 说明 |
---|---|
Build |
对生成的引用。 |
Custom |
自定义字段信息。 允许的键: 值对 - ( AttemptId: int 值,IsTestResultFlaky: bool) |
Failing |
由于测试结果的信息而失败。 |
Identity |
|
Job |
管道中的作业。 这与 YAML 中的矩阵相关。 |
Phase |
管道中的阶段 |
Pipeline |
管道参考 |
Reference |
|
Release |
对发布的引用。 |
Result |
结果的层次结构类型,默认值 None 表示其叶节点。 |
Results |
|
Service | |
Shallow |
对某些其他资源的抽象引用。 此类用于提供生成数据协定,使用统一的方式引用其他资源,以便轻松遍历链接。 |
Shared |
对共享步骤工作项的引用。 |
Stage |
管道中的阶段 |
Test |
表示测试步骤结果。 |
Test |
表示测试结果。 |
Test |
测试迭代中的测试附件信息。 |
Test |
对测试结果的引用。 |
Test |
表示测试迭代结果。 |
Test |
|
Test |
|
Test |
测试迭代中的测试参数信息。 |
Test |
|
Test |
|
Test |
表示测试结果的子结果。 |
BuildReference
对生成的引用。
名称 | 类型 | 说明 |
---|---|---|
branchName |
string |
分支名称。 |
buildSystem |
string |
生成系统。 |
definitionId |
integer |
生成定义 ID。 |
id |
integer |
生成 ID。 |
number |
string |
Build 号。 |
repositoryId |
string |
存储库 ID。 |
uri |
string |
生成 URI。 |
CustomTestField
自定义字段信息。 允许的键: 值对 - ( AttemptId: int 值,IsTestResultFlaky: bool)
名称 | 类型 | 说明 |
---|---|---|
fieldName |
string |
字段名称。 |
value |
object |
字段值。 |
FailingSince
由于测试结果的信息而失败。
名称 | 类型 | 说明 |
---|---|---|
build |
失败后生成引用。 |
|
date |
string |
自 UTC) (失败以来的时间。 |
release |
失败后发布引用。 |
IdentityRef
名称 | 类型 | 说明 |
---|---|---|
_links | ||
descriptor |
string |
|
directoryAlias |
string |
|
displayName |
string |
|
id |
string |
|
imageUrl |
string |
|
inactive |
boolean |
|
isAadIdentity |
boolean |
|
isContainer |
boolean |
|
isDeletedInOrigin |
boolean |
|
profileUrl |
string |
|
uniqueName |
string |
|
url |
string |
JobReference
管道中的作业。 这与 YAML 中的矩阵相关。
名称 | 类型 | 说明 |
---|---|---|
attempt |
integer |
作业的尝试次数 |
jobName |
string |
YAML 中的矩阵在矩阵中生成具有不同输入的作业的副本。 JobName 是这些输入的名称。 名称支持的最大长度为 256 个字符。 |
PhaseReference
管道中的阶段
名称 | 类型 | 说明 |
---|---|---|
attempt |
integer |
阶段的尝试次数 |
phaseName |
string |
阶段的名称。 名称支持的最大长度为 256 个字符。 |
PipelineReference
管道参考
名称 | 类型 | 说明 |
---|---|---|
jobReference |
作业的引用 |
|
phaseReference |
阶段的引用。 |
|
pipelineId |
integer |
与此管道实例相关的管道的引用。 |
stageReference |
阶段的引用。 |
ReferenceLinks
名称 | 类型 | 说明 |
---|---|---|
links |
object |
ReleaseReference
对发布的引用。
名称 | 类型 | 说明 |
---|---|---|
attempt |
integer |
发布尝试次数。 |
creationDate |
string |
发行创建日期 (UTC) 。 |
definitionId |
integer |
发布定义 ID。 |
environmentCreationDate |
string |
环境创建日期 (UTC) 。 |
environmentDefinitionId |
integer |
发布环境定义 ID。 |
environmentDefinitionName |
string |
发布环境定义名称。 |
environmentId |
integer |
发布环境 ID。 |
environmentName |
string |
发布环境名称。 |
id |
integer |
发布 ID。 |
name |
string |
版本名称。 |
ResultGroupType
结果的层次结构类型,默认值 None 表示其叶节点。
值 | 说明 |
---|---|
dataDriven |
测试结果的层次结构类型。 |
generic |
未知的层次结构类型。 |
none |
测试结果的叶节点。 |
orderedTest |
测试结果的层次结构类型。 |
rerun |
测试结果的层次结构类型。 |
ResultsFilter
名称 | 类型 | 说明 |
---|---|---|
automatedTestName |
string |
|
branch |
string |
|
executedIn | ||
groupBy |
string |
|
maxCompleteDate |
string |
|
resultsCount |
integer |
|
testCaseId |
integer |
|
testCaseReferenceIds |
integer[] |
|
testPlanId |
integer |
|
testPointIds |
integer[] |
|
testResultsContext | ||
trendDays |
integer |
Service
值 | 说明 |
---|---|
any | |
tcm | |
tfs |
ShallowReference
对某些其他资源的抽象引用。 此类用于提供生成数据协定,使用统一的方式引用其他资源,以便轻松遍历链接。
名称 | 类型 | 说明 |
---|---|---|
id |
string |
资源的 ID |
name |
string |
链接资源的名称 (定义名称、控制器名称等 ) |
url |
string |
指向资源的完整 http 链接 |
SharedStepModel
对共享步骤工作项的引用。
名称 | 类型 | 说明 |
---|---|---|
id |
integer |
WorkItem 共享步骤 ID。 |
revision |
integer |
共享步骤工作项修订。 |
StageReference
管道中的阶段
名称 | 类型 | 说明 |
---|---|---|
attempt |
integer |
阶段的尝试次数 |
stageName |
string |
阶段的名称。 名称支持的最大长度为 256 个字符。 |
TestActionResultModel
表示测试步骤结果。
名称 | 类型 | 说明 |
---|---|---|
actionPath |
string |
测试用例 workitem 中测试步骤的路径标识符。 注意: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 |
执行完成的时间 (UTC) 。 |
durationInMs |
number |
执行持续时间。 |
errorMessage |
string |
结果中的错误消息。 |
iterationId |
integer |
测试操作结果的迭代 ID。 |
outcome |
string |
结果的测试结果。 |
sharedStepModel |
对共享步骤工作项的引用。 |
|
startedDate |
string |
开始执行的时间 (UTC) 。 |
stepIdentifier |
string |
这是测试用例的步骤 ID。 对于共享步骤,它是测试用例 workitem 中共享步骤的步骤 ID;共享步骤中的步骤 ID。 示例:TestCase workitem 有两个步骤:1) Id = 1 2 的普通步骤) Id = 2 的共享步骤。 在共享步骤内:一个) id = 1 的普通步骤,对于第一步:“1”,第二步:“2;1" |
url |
string |
测试操作结果的 URL。 在托管环境中已弃用。 |
TestCaseResult
表示测试结果。
名称 | 类型 | 说明 |
---|---|---|
afnStripId |
integer |
测试操作录制的附件 ID。 |
area |
对测试的区域路径的引用。 |
|
associatedBugs |
对链接到测试结果的 bug 的引用。 |
|
automatedTestId |
string |
表示 dll 中测试方法的 ID。 |
automatedTestName |
string |
执行的测试的完全限定名称。 |
automatedTestStorage |
string |
测试所属的容器。 |
automatedTestType |
string |
自动测试的类型。 |
automatedTestTypeId |
string |
自动测试的 TypeId。 |
build |
对与测试结果关联的生成的浅表引用。 |
|
buildReference |
引用与测试结果关联的生成。 |
|
comment |
string |
在测试结果中注释 maxSize= 1000 个字符。 |
completedDate |
string |
测试执行完成的时间 (UTC) 。 完成日期应大于 StartedDate。 |
computerName |
string |
执行测试的计算机名称。 |
configuration |
对测试配置的引用。 键入 ShallowReference。 |
|
createdDate |
string |
(UTC) 创建测试结果时的时间戳。 |
customFields |
测试结果的其他属性。 |
|
durationInMs |
number |
测试执行的持续时间(以毫秒为单位)。 如果未提供值,则将设置为 CompletedDate - StartedDate |
errorMessage |
string |
测试执行中的错误消息。 |
failingSince |
测试结果开始失败时的信息。 |
|
failureType |
string |
测试结果的失败类型。 有效值= (已知问题、新问题、回归、未知、无) |
id |
integer |
测试结果的 ID。 |
iterationDetails |
仅用于手动测试的测试迭代的测试结果详细信息。 |
|
lastUpdatedBy |
对标识上次更新的测试结果的引用。 |
|
lastUpdatedDate |
string |
测试结果的上次更新时间 (UTC) 。 |
outcome |
string |
测试结果的测试结果。 有效值 = (Unspecified、None、Passed、Failed、Inclusive、Timeout、Aborted、Blocked、NotExecuted、Warning、Error、NotApplicable、Paused、InProgress、NotImpacted) |
owner |
对测试所有者的引用。 |
|
priority |
integer |
执行的测试的优先级。 |
project |
对团队项目的引用。 |
|
release |
对与测试结果关联的发布的浅表引用。 |
|
releaseReference |
对与测试结果关联的发布的引用。 |
|
resetCount |
integer |
ResetCount。 |
resolutionState |
string |
测试结果的解析状态。 |
resolutionStateId |
integer |
解析状态的 ID。 |
resultGroupType |
结果的层次结构类型,默认值 None 表示其叶节点。 |
|
revision |
integer |
测试结果的修订号。 |
runBy |
对标识的引用执行了测试。 |
|
stackTrace |
string |
具有 maxSize= 1000 个字符的 Stacktrace。 |
startedDate |
string |
测试执行开始的时间 (UTC) 。 |
state |
string |
测试结果的状态。 键入 TestRunState。 |
subResults |
测试结果中的子结果列表,如果 ResultGroupType 不是“无”,则保存相应的类型子结果。 |
|
testCase |
对所执行测试的引用。 |
|
testCaseReferenceId |
integer |
测试结果使用的测试的引用 ID。 类型 TestResultMetaData |
testCaseRevision |
integer |
TestCaseRevision 编号。 |
testCaseTitle |
string |
测试的名称。 |
testPlan |
对测试计划测试用例 workitem 的引用是 其中的一部分。 |
|
testPoint |
对执行的测试点的引用。 |
|
testRun |
对测试运行的引用。 |
|
testSuite |
对测试套件测试用例 workitem 的引用是 的一部分。 |
|
url |
string |
测试结果的 URL。 |
TestCaseResultAttachmentModel
测试迭代中的测试附件信息。
名称 | 类型 | 说明 |
---|---|---|
actionPath |
string |
测试用例 workitem 中的路径标识符测试步骤。 |
id |
integer |
附件 ID。 |
iterationId |
integer |
迭代 ID。 |
name |
string |
附件的名称。 |
size |
integer |
附件大小。 |
url |
string |
附件的 URL。 |
TestCaseResultIdentifier
对测试结果的引用。
名称 | 类型 | 说明 |
---|---|---|
testResultId |
integer |
测试结果 ID。 |
testRunId |
integer |
测试运行 ID。 |
TestIterationDetailsModel
表示测试迭代结果。
名称 | 类型 | 说明 |
---|---|---|
actionResults |
测试步骤会导致迭代。 |
|
attachments |
对测试迭代结果中的附件的引用。 |
|
comment |
string |
测试迭代结果中的注释。 |
completedDate |
string |
执行完成的时间 (UTC) 。 |
durationInMs |
number |
执行持续时间。 |
errorMessage |
string |
测试迭代结果执行中的错误消息。 |
id |
integer |
测试迭代结果的 ID。 |
outcome |
string |
如果测试迭代结果,则测试结果。 |
parameters |
在迭代中测试参数。 |
|
startedDate |
string |
开始执行的时间 (UTC) 。 |
url |
string |
测试迭代结果的 URL。 |
TestResultHistory
名称 | 类型 | 说明 |
---|---|---|
groupByField |
string |
|
resultsForGroup |
TestResultHistoryDetailsForGroup
名称 | 类型 | 说明 |
---|---|---|
groupByValue |
object |
|
latestResult |
表示测试结果。 |
TestResultParameterModel
测试迭代中的测试参数信息。
名称 | 类型 | 说明 |
---|---|---|
actionPath |
string |
引用参数的测试步骤路径。 |
iterationId |
integer |
迭代 ID。 |
parameterName |
string |
参数的名称, |
stepIdentifier |
string |
这是测试用例的步骤 ID。 对于共享步骤,它是测试用例 workitem 中共享步骤的步骤 ID;共享步骤中的步骤 ID。 示例:TestCase workitem 有两个步骤:1) Id = 1 2 的普通步骤) Id = 2 的共享步骤。 在共享步骤内:一个) id = 1 的普通步骤,对于第一步:“1”,第二步:“2;1" |
url |
string |
测试参数的 URL。 在托管环境中已弃用。 |
value |
string |
参数的值。 |
TestResultsContext
名称 | 类型 | 说明 |
---|---|---|
build |
对生成的引用。 |
|
contextType | ||
pipelineReference |
管道参考 |
|
release |
对发布的引用。 |
TestResultsContextType
值 | 说明 |
---|---|
build | |
pipeline | |
release |
TestSubResult
表示测试结果的子结果。
名称 | 类型 | 说明 |
---|---|---|
comment |
string |
子结果中的注释。 |
completedDate |
string |
测试执行完成的时间 (UTC) 。 |
computerName |
string |
执行测试的计算机。 |
configuration |
对测试配置的引用。 |
|
customFields |
子结果的其他属性。 |
|
displayName |
string |
子结果的名称。 |
durationInMs |
integer |
测试执行的持续时间。 |
errorMessage |
string |
子结果中的错误消息。 |
id |
integer |
子结果的 ID。 |
lastUpdatedDate |
string |
结果上次更新的时间 (UTC) 。 |
outcome |
string |
子结果的结果。 |
parentId |
integer |
子结果的直接父 ID。 |
resultGroupType |
结果的层次结构类型,默认值 None 表示其叶节点。 |
|
sequenceId |
integer |
子结果的索引号。 |
stackTrace |
string |
Stacktrace。 |
startedDate |
string |
测试执行开始的时间 (UTC) 。 |
subResults |
子结果中的子结果列表,如果 ResultGroupType 不是“无”,则保存相应的类型子结果。 |
|
testResult |
对测试结果的引用。 |
|
url |
string |
子结果的 URL。 |