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
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, default on.
--report-azdo-failures-expanded — on/off, default on.
--report-azdo-raw-log-progress — on/off, default on.
--report-azdo-failure-annotations — on/off, default on.
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 new IProgressEnricher hook + 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.cs
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/MSBuild.KnownExtensionRegistration.cs
- Unit tests in
test/UnitTests/Microsoft.Testing.Extensions.UnitTests/ — verify exact escape behaviour for AzDoEscaper on each new emission.
Out of scope
Related
Summary
Extend the existing
Microsoft.Testing.Extensions.AzureDevOpsReportpackage to participate in the newIProgressEnrichersurface (introduced by #9139) so AzDO CI users get a much richer raw-log + UI experience:##[group]/##[endgroup]so the AzDO log view collapses them by default.##vso[task.issue type=error;sourcepath=…;linenumber=…]so failures appear in the AzDO Issues tab and the Files-changed gutter.##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
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.Proposed behaviour
Log groups
On
IProgressEnricher.OnAssemblyStart(asm):##[group]Tests: {asm.Name} ({asm.TargetFramework})On
IProgressEnricher.OnAssemblyEnd(asm):##[endgroup]When
--report-azdo-failures-expandedis set (defaulttrue), 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.issuerecords; 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(defaulttrue).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-progressisn'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.dotnet msbuild src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Microsoft.Testing.Extensions.AzureDevOpsReport.csproj /t:UpdateXlf.test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HelpInfoAllExtensionsTests.cstest/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/MSBuild.KnownExtensionRegistration.cstest/UnitTests/Microsoft.Testing.Extensions.UnitTests/— verify exact escape behaviour forAzDoEscaperon each new emission.Out of scope
##vso[task.uploadsummary]/ artifacts).Related
IProgressEnricherhook (prerequisite).