Share via


Resultsummarybypipeline - Query

Get summary of test results.

GET https://vstmr.dev.azure.com/{organization}/{project}/_apis/testresults/resultsummarybypipeline?pipelineId={pipelineId}&api-version=7.1-preview.1
GET https://vstmr.dev.azure.com/{organization}/{project}/_apis/testresults/resultsummarybypipeline?pipelineId={pipelineId}&stageName={stageName}&phaseName={phaseName}&jobName={jobName}&includeFailureDetails={includeFailureDetails}&api-version=7.1-preview.1

URI Parameters

Name In Required Type Description
organization
path True

string

The name of the Azure DevOps organization.

project
path True

string

Project ID or project name

api-version
query True

string

Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.

pipelineId
query True

integer (int32)

Pipeline Id. This is same as build Id.

includeFailureDetails
query

boolean

If true returns failure insights

jobName
query

string

Matrixing in YAML generates copies of a job with different inputs in matrix. JobName is the name of those input. Maximum supported length for name is 256 character.

phaseName
query

string

Name of the phase. Maximum supported length for name is 256 character.

stageName
query

string

Name of the stage. Maximum supported length for name is 256 character.

Responses

Name Type Description
200 OK

TestResultSummary

successful operation

Security

accessToken

Personal access token. Use any value for the user name and the token as the password.

Type: basic

Definitions

Name Description
AggregatedResultsAnalysis
AggregatedResultsByOutcome
AggregatedResultsDifference
AggregatedRunsByOutcome
AggregatedRunsByState
BuildReference

Reference to a build.

JobReference

Job in pipeline. This is related to matrixing in YAML.

PhaseReference

Phase in pipeline

PipelineReference

Pipeline reference

ProjectState
ProjectVisibility
ReleaseReference

Reference to a release.

StageReference

Stage in pipeline

TeamProjectReference
TestCaseResultIdentifier

Reference to a test result.

TestFailureDetails
TestFailuresAnalysis
TestOutcome
TestResultsContext
TestResultsContextType
TestResultSummary
TestRunOutcome
TestRunState

AggregatedResultsAnalysis

Name Type Description
duration

string (TimeSpan)

notReportedResultsByOutcome

<string,  AggregatedResultsByOutcome>

previousContext

TestResultsContext

resultsByOutcome

<string,  AggregatedResultsByOutcome>

resultsDifference

AggregatedResultsDifference

runSummaryByOutcome

<string,  AggregatedRunsByOutcome>

runSummaryByState

<string,  AggregatedRunsByState>

totalTests

integer (int32)

AggregatedResultsByOutcome

Name Type Description
count

integer (int32)

duration

string (TimeSpan)

groupByField

string

groupByValue

object

outcome

TestOutcome

rerunResultCount

integer (int32)

AggregatedResultsDifference

Name Type Description
increaseInDuration

string (TimeSpan)

increaseInFailures

integer (int32)

increaseInNonImpactedTests

integer (int32)

increaseInOtherTests

integer (int32)

increaseInPassedTests

integer (int32)

increaseInTotalTests

integer (int32)

AggregatedRunsByOutcome

Name Type Description
outcome

TestRunOutcome

runsCount

integer (int32)

AggregatedRunsByState

Name Type Description
resultsByOutcome

<string,  AggregatedResultsByOutcome>

runsCount

integer (int32)

state

TestRunState

BuildReference

Reference to a build.

Name Type Description
branchName

string

Branch name.

buildSystem

string

Build system.

definitionId

integer (int32)

Build Definition ID.

id

integer (int32)

Build ID.

number

string

Build Number.

repositoryId

string

Repository ID.

uri

string

Build URI.

JobReference

Job in pipeline. This is related to matrixing in YAML.

Name Type Description
attempt

integer (int32)

Attempt number of the job

jobName

string

Matrixing in YAML generates copies of a job with different inputs in matrix. JobName is the name of those input. Maximum supported length for name is 256 character.

PhaseReference

Phase in pipeline

Name Type Description
attempt

integer (int32)

Attempt number of the phase

phaseName

string

Name of the phase. Maximum supported length for name is 256 character.

PipelineReference

Pipeline reference

Name Type Description
jobReference

JobReference

Reference of the job

phaseReference

PhaseReference

Reference of the phase.

pipelineId

integer (int32)

Reference of the pipeline with which this pipeline instance is related.

stageReference

StageReference

Reference of the stage.

ProjectState

Value Description
all
createPending
deleted
deleting
new
unchanged
wellFormed

ProjectVisibility

Value Description
private
public

ReleaseReference

Reference to a release.

Name Type Description
attempt

integer (int32)

Number of Release Attempt.

creationDate

string (date-time)

Release Creation Date(UTC).

definitionId

integer (int32)

Release definition ID.

environmentCreationDate

string (date-time)

Environment creation Date(UTC).

environmentDefinitionId

integer (int32)

Release environment definition ID.

environmentDefinitionName

string

Release environment definition name.

environmentId

integer (int32)

Release environment ID.

environmentName

string

Release environment name.

id

integer (int32)

Release ID.

name

string

Release name.

StageReference

Stage in pipeline

Name Type Description
attempt

integer (int32)

Attempt number of stage

stageName

string

Name of the stage. Maximum supported length for name is 256 character.

TeamProjectReference

Name Type Description
abbreviation

string

defaultTeamImageUrl

string

description

string

id

string (uuid)

lastUpdateTime

string (date-time)

name

string

revision

integer (int64)

state

ProjectState

url

string

visibility

ProjectVisibility

TestCaseResultIdentifier

Reference to a test result.

Name Type Description
testResultId

integer (int32)

Test result ID.

testRunId

integer (int32)

Test run ID.

TestFailureDetails

Name Type Description
count

integer (int32)

testResults

TestCaseResultIdentifier[]

Reference to a test result.

TestFailuresAnalysis

Name Type Description
existingFailures

TestFailureDetails

fixedTests

TestFailureDetails

newFailures

TestFailureDetails

previousContext

TestResultsContext

TestOutcome

Value Description
aborted

Test was aborted. This was not caused by a user gesture, but rather by a framework decision.

blocked

Test had it chance for been executed but was not, as ITestElement.IsRunnable == false.

error

There was a system error while we were trying to execute a test.

failed

Test was executed, but there were issues. Issues may involve exceptions or failed assertions.

inProgress

Test is currently executing. Added this for TCM charts

inconclusive

Test has completed, but we can't say if it passed or failed. May be used for aborted tests...

none

Test has not been completed, or the test type does not report pass/failure.

notApplicable

Test is Not Applicable for execution.

notExecuted

Test was not executed. This was caused by a user gesture - e.g. user hit stop button.

notImpacted

Test is not impacted. Added fot TIA.

passed

Test was executed w/o any issues.

paused

Test is paused.

timeout

The test timed out

unspecified

Only used during an update to preserve the existing value.

warning

To be used by Run level results. This is not a failure.

TestResultsContext

Name Type Description
build

BuildReference

Reference to a build.

contextType

TestResultsContextType

pipelineReference

PipelineReference

Pipeline reference

release

ReleaseReference

Reference to a release.

TestResultsContextType

Value Description
build
pipeline
release

TestResultSummary

Name Type Description
aggregatedResultsAnalysis

AggregatedResultsAnalysis

noConfigRunsCount

integer (int32)

teamProject

TeamProjectReference

testFailures

TestFailuresAnalysis

testResultsContext

TestResultsContext

totalRunsCount

integer (int32)

TestRunOutcome

Value Description
failed

Run with at-least one failed test.

notImpacted

Run with no impacted tests.

others

Runs with All tests in other category.

passed

Run with zero failed tests and has at least one impacted test

TestRunState

Value Description
aborted

Run is stopped and remaining tests have been aborted

completed

All tests have completed or been skipped.

inProgress

Tests are running.

needsInvestigation

Run requires investigation because of a test point failure This is a legacy state and should not be used any more

notStarted

The run is still being created. No tests have started yet.

unspecified

Only used during an update to preserve the existing value.

waiting

Run is currently initializing This is a legacy state and should not be used any more