Repository navigation
Add AzDO summary, progress and stack-frame filter options (#5951 item 4) - #8778
Merged
Amaury Levé (Evangelink) merged 2 commits intoJun 3, 2026
Conversation
…#5951 item 4) Adds three additive options to the Microsoft.Testing.Extensions.AzureDevOpsReport extension: * --report-azdo-summary[=path] - writes a markdown summary (totals, slowest tests, top failing classes) and emits ##vso[task.uploadsummary] so it shows up on the AzDO build summary tab. Default path is {testResultsDir}/azdo-summary-{tfm}.md. * --report-azdo-progress - emits ##vso[task.logdetail] timeline records so long MTP runs surface a per-assembly node in the AzDO log UI with a live progress percentage. Throttled to integer-percent changes and monotonic. * --report-azdo-stackframe-filter <regex> (repeatable) - extra user-supplied regexes that are treated as assertion-implementation frames and skipped during failure reporting. Compiled once with a 500ms ReDoS-safety timeout, validated at parse time, and additive to the built-in MSTest prefixes. All three require --report-azdo and TF_BUILD=true (warning emitted otherwise), matching the existing extension's behavior. Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds richer Azure DevOps (AzDO) build integration for --report-azdo consumers by introducing new reporters for job summaries and live timeline progress, plus user-configurable stack-frame filtering for call-site annotation.
Changes:
- Add
AzureDevOpsSummaryReporterto generate/upload a Markdown job summary via##vso[task.uploadsummary]. - Add
AzureDevOpsProgressReporterto emit##vso[task.logdetail ... progress=...]timeline updates during execution. - Add
--report-azdo-stackframe-filteroption (with validation) and wire it intoAzureDevOpsReporterstack-frame skipping logic; update unit tests and help baselines accordingly.
Show a summary per file
| File | Description |
|---|---|
| test/UnitTests/Microsoft.Testing.Extensions.UnitTests/AzureDevOpsSummaryReporterTests.cs | New unit tests covering Markdown summary shape, escaping, and uploadsummary emission gating. |
| test/UnitTests/Microsoft.Testing.Extensions.UnitTests/AzureDevOpsProgressReporterTests.cs | New unit tests validating AzDO logdetail lifecycle, throttling, monotonic progress, and final result emission. |
| test/UnitTests/Microsoft.Testing.Extensions.UnitTests/AzureDevOpsCommandLineProviderTests.cs | Adds validation coverage for new AzDO options (requires --report-azdo, max patterns, invalid regex). |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HelpInfoAllExtensionsTests.cs | Updates help/info baselines to include the three new CLI options. |
| src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/xlf/AzureDevOpsResources.*.xlf | Adds localized resource entries for new options and validation/warning messages. |
| src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/Resources/AzureDevOpsResources.resx | Adds resource strings for new options + validation/warnings. |
| src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/AzureDevOpsSummaryReporter.cs | Implements summary file generation and task.uploadsummary emission. |
| src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/AzureDevOpsReporter.cs | Adds user-provided stack-frame filter support when selecting call-site frames. |
| src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/AzureDevOpsProgressReporter.cs | Implements live AzDO timeline progress emission via task.logdetail. |
| src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/AzureDevOpsExtensions.cs | Registers the new reporters as data consumers + session lifetime handlers. |
| src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/AzureDevOpsCommandLineProvider.cs | Defines new CLI options and adds validation for stack-frame filters and --report-azdo gating. |
| src/Platform/Microsoft.Testing.Extensions.AzureDevOpsReport/AzureDevOpsCommandLineOptions.cs | Adds constants for the three new option names. |
Copilot's findings
- Files reviewed: 24/24 changed files
- Comments generated: 3
Co-authored-by: Copilot <[email protected]>
Amaury Levé (Evangelink)
enabled auto-merge (squash)
June 3, 2026 10:41
Jan Krivanek (JanKrivanek)
approved these changes
Jun 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements item 4 of #5951 - rich AzDO build experience for
--report-azdoconsumers.What
Adds three new options to the
Microsoft.Testing.Extensions.AzureDevOpsReportextension. All require--report-azdoandTF_BUILD=trueto take effect (a warning is emitted otherwise, mirroring the existing--report-azdo-uploadgating).1.
--report-azdo-summary[=path]ZeroOrOne. Default path:{testResultsDir}/azdo-summary-{tfm}.md.##vso[task.uploadsummary]<absolutePath>so AzDO surfaces it on the build summary tab.|are escaped for valid markdown table rendering.2.
--report-azdo-progressZero. Opt-in (off by default).##vso[task.logdetail id=<g>;name=<assembly>(<tfm>);type=Build;order=1;state=InProgress]to create a per-test-app timeline node.TestNodeUpdateMessageupdates (Passed/Failed/Skipped/Error/Timeout/Cancelled), increments completed/seen counters and re-emitsprogress=<n>only when the integer percentage changes (250ms minimum interval, monotonic, deduped byTestNode.Uid).state=Completed;result=Succeeded|Failed.3.
--report-azdo-stackframe-filter <regex>(repeatable)OneOrMore(at least one regex required when the option is specified). Up to 16 patterns (MaxStackFrameFilterPatterns).RegexOptions.CultureInvariant | RegexOptions.CompiledandTimeSpan.FromMilliseconds(500)timeout (ReDoS guard).ValidateOptionArgumentsAsync; invalid regex fails command-line validation.AzureDevOpsReporter.IsAssertionImplementationFrame- existing built-in filtering is preserved.not a match(frame is kept), not as a runtime error.Tests
AzureDevOpsSummaryReporterTests(7 tests) - markdown shape, escaping, percentage math, uploadsummary emission.AzureDevOpsProgressReporterTests(8 tests) - logdetail lifecycle, monotonic progress, percentage clamping, throttling, terminal-state aggregation.AzureDevOpsCommandLineProviderTests(6 new cases) - validation: requires--report-azdo, max-patterns, invalid-regex rejection.Microsoft.Testing.Extensions.UnitTestsAzDO tests pass.HelpInfoAllExtensionsTestsupdated with the 3 new options.Notes
task.uploadsummaryrequires an absolute path - the reporter resolves it viaPath.GetFullPath.task.logdetailwithprogressis used rather thantask.setprogressbecausesetprogressonly updates the parent task, not the custom timeline record..xlffiles were regenerated viadotnet msbuild .../UpdateXlf.Out of scope
--report-azdo-summaryhtmloutput is deferred until HTML logger porting #5754 ships - markdown only for now.samples/xUnitPlayground/(untracked locally, unrelated to this PR) is intentionally not included.