Repository navigation
Description
Summary
Extend the existing Microsoft.Testing.Extensions.AzureDevOpsReport package to participate in the new IProgressEnricher surface (introduced by #9139) so AzDO CI users get a much richer raw-log + UI experience:
- Per-assembly log groups — wrap each test assembly in
##[group]/##[endgroup]so the AzDO log view collapses them by default. - Failure annotations — emit
##vso[task.issue type=error;sourcepath=…;linenumber=…]so failures appear in the AzDO Issues tab and the Files-changed gutter. - Raw-log progress mirror — alongside each existing
##vso[task.logdetail …]command, emit a single plain-text line so the raw log file (downloaded ZIP, log-search tools, anywhere outside the AzDO UI) is also useful:
[tests 37%] MSTest.UnitTests (net9.0): 312/845 completed (0 failed)
Motivation
- The AzDO extension currently only feeds the timeline panel of the AzDO UI. The raw log file is silent (see parent Add CI-friendly textual progress heartbeat to MTP terminal reporter (raw log progress signal) #9125).
- The new
IProgressEnricherhook surface from Silence-driven progress heartbeat renderer for SimpleAnsi/NoAnsi terminal modes #9139 lets the extension wrap/annotate the platform's text output without changes to core. - Failures buried in the middle of a 10k-line log are a major triage pain point.
Proposed behaviour
Log groups
On IProgressEnricher.OnAssemblyStart(asm):
##[group]Tests: {asm.Name} ({asm.TargetFramework})
On IProgressEnricher.OnAssemblyEnd(asm):
##[endgroup]
When --report-azdo-failures-expanded is set (default true), groups that contain at least one failure are auto-expanded by emitting ##[warning] markers (AzDO heuristic).
Failure annotations
On IProgressEnricher.OnFailure(testResult):
##vso[task.issue type=error;sourcepath={file};linenumber={line};columnnumber={col}]Test failed: {fqn} — {firstLineOfMessage}
Multiple failures emit multiple task.issue records; AzDO de-duplicates by file+line.
Raw-log mirror
Inside the existing AzureDevOpsProgressReporter (AzureDevOpsProgressReporter.cs:108-110, 195-198, 226-229), emit a plain-text companion line right after each ##vso[task.logdetail] command, gated by --report-azdo-raw-log-progress (default true).
Knobs
--report-azdo-groups— on/off, defaulton.--report-azdo-failures-expanded— on/off, defaulton.--report-azdo-raw-log-progress— on/off, defaulton.--report-azdo-failure-annotations— on/off, defaulton.
All knobs auto-disable when --report-azdo-progress isn't already set, so this stays opt-in via the existing master switch.
Touchpoints
src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/AzureDevOpsProgressReporter.cs— wire into newIProgressEnricherhook + add raw-log mirror.src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/AzureDevOpsReportCommandLineOptionsProvider.cs— add the four new options.- Resource strings +
dotnet msbuild src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Microsoft.Testing.Extensions.AzureDevOpsReport.csproj /t:UpdateXlf. - Help/info acceptance test expectations (alphabetically sorted):
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HelpInfoAllExtensionsTests.cstest/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/MSBuild.KnownExtensionRegistration.cs
- Unit tests in
test/UnitTests/Microsoft.Testing.Extensions.UnitTests/— verify exact escape behaviour forAzDoEscaperon each new emission.
Out of scope
- Test history / p95-p99 enrichment — separate package, Azure DevOps history-driven slow-test threshold enricher #9140.
- GitHub Actions equivalents — separate package, in a sibling issue.
- Test attachment uploads (
##vso[task.uploadsummary]/ artifacts).
Related
- Add CI-friendly textual progress heartbeat to MTP terminal reporter (raw log progress signal) #9125 — parent design discussion (see "Building blocks" S1 grouping + S2 mirror).
- Silence-driven progress heartbeat renderer for SimpleAnsi/NoAnsi terminal modes #9139 — silence-driven heartbeat +
IProgressEnricherhook (prerequisite). - Azure DevOps history-driven slow-test threshold enricher #9140 — sibling AzDO extension for slow-test history.
Activity
Evangelink commentedon Jun 16, 2026
Re-scoping this after mapping the proposal against the current code (and the decision to drop the
task.logdetailprogress path because it doesn't render in the modern AzDO Pipelines UI). Splitting into a few focused PRs:1. Per-assembly log groups —
#9177(open).##[group]/##[endgroup]wrapping per test assembly, gated on--report-azdo+TF_BUILD. These format commands do render in the modern UI.2. Failure annotations — already shipped.
AzureDevOpsReporteralready emits##vso[task.logissue type=…;sourcepath=…;linenumber=…]for failed/errored/timed-out tests, with a message-only fallback. Note: the issue text proposed##vso[task.issue …], which is not a valid AzDO command —task.logissueis the correct one, and it's what we emit. Nothing to do here unless we want an explicit on/off knob (cheap follow-up).3. Raw-log progress mirror — dropped. This was specified as a plain-text companion to each
##vso[task.logdetail]line, but--report-azdo-progress/AzureDevOpsProgressReporterare being removed (logdetail records aren't rendered in the modern Pipelines UI; see #9154 follow-up). The CI-friendly raw-log progress signal is better served by the terminal heartbeat work in #9125 / #9139 (#9147), not by the AzDO extension.Net: of the four proposed knobs, only a possible
--report-azdo-groupsopt-out remains relevant, and groups default-on is fine for now. Closing the loop on 2 and 3 here so the issue tracks reality.Add Azure DevOps per-assembly log groups (#9141) (#9177)
Evangelink commentedon Jul 1, 2026
Closing this out. After the re-scope, all remaining in-scope work has shipped:
AzureDevOpsLogGroupReporter,##[group]/##[endgroup], gated on--report-azdo+TF_BUILD)##vso[task.logissue …]inAzureDevOpsReporter(the issue''s proposedtask.issuewas invalid AzDO syntax)AzureDevOpsProgressReporter/task.logdetail, which don''t render in the modern Pipelines UI and are being removed; CI-friendly progress is covered by the terminal heartbeat work (#9125/#9139/#9147)The only leftover was an optional
--report-azdo-groupsopt-out knob; groups default-on is fine, so there''s nothing blocking. We can spin up a fresh focused issue if we ever want that knob.