From f4d8d35bf45ce0ece75a66e1b197c96684767e48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amaury=20Lev=C3=A9?= Date: Fri, 30 Oct 2026 12:12:15 +0100 Subject: [PATCH 1/6] Show truthful CI progress and prioritize terminal run failures Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .../ci-terminal-progress-summaries.md | 128 +++++++++++ docs/glossary.md | 19 +- .../Terminal/IProgressRenderer.cs | 3 +- .../SilenceDrivenHeartbeatRenderer.cs | 65 ++++-- .../Terminal/TerminalResources.cs | 4 + .../Terminal/TerminalResources.resx | 11 +- .../Terminal/TerminalTestReporter.Summary.cs | 114 ++++++---- .../Terminal/TerminalTestReporter.cs | 5 +- .../Terminal/TerminalTestReporterOptions.cs | 10 +- .../TestProgressStateAwareTerminal.cs | 9 +- .../Terminal/xlf/TerminalResources.cs.xlf | 16 +- .../Terminal/xlf/TerminalResources.de.xlf | 16 +- .../Terminal/xlf/TerminalResources.es.xlf | 16 +- .../Terminal/xlf/TerminalResources.fr.xlf | 16 +- .../Terminal/xlf/TerminalResources.it.xlf | 16 +- .../Terminal/xlf/TerminalResources.ja.xlf | 16 +- .../Terminal/xlf/TerminalResources.ko.xlf | 16 +- .../Terminal/xlf/TerminalResources.pl.xlf | 16 +- .../Terminal/xlf/TerminalResources.pt-BR.xlf | 16 +- .../Terminal/xlf/TerminalResources.ru.xlf | 16 +- .../Terminal/xlf/TerminalResources.tr.xlf | 16 +- .../xlf/TerminalResources.zh-Hans.xlf | 16 +- .../xlf/TerminalResources.zh-Hant.xlf | 16 +- .../TerminalOutputDevice.Initialization.cs | 9 +- .../SilenceDrivenHeartbeatRendererTests.cs | 148 +++++++++++- .../Terminal/TerminalTestReporterTests.cs | 211 +++++++++++++++++- 26 files changed, 813 insertions(+), 131 deletions(-) create mode 100644 docs/decisions/ci-terminal-progress-summaries.md diff --git a/docs/decisions/ci-terminal-progress-summaries.md b/docs/decisions/ci-terminal-progress-summaries.md new file mode 100644 index 0000000000..dea0a53d13 --- /dev/null +++ b/docs/decisions/ci-terminal-progress-summaries.md @@ -0,0 +1,128 @@ +# CI terminal progress and summaries: research and decisions + +## Problem and contract + +The public TestFx [build 1655468](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1655468) +at `b3b88187058a2f024d9d9981d143172953d05fd2` had long quiet test +intervals despite continuing test completions. Its Debug step also repeated +successful module results in the final summary and placed artifact paths before +the run verdict. The implementation baseline is +`7dd2407848979d58f0e9b2bd75101a2dbfa7d1bc`. + +The non-cursor reporter must distinguish **visible output** from **test +completion**. After 60 seconds without visible reporter output it should report +the real cumulative completed/failed counts, active module count, and age of the +last completion (or explicitly state that no test has completed). Emitting a +heartbeat is not evidence that a test completed. Completed modules must remain +in the aggregate when their rendering slots are reused. + +Non-cursor final summaries should lead with the verdict and counts, then +failures, then optional details and artifact paths. Successful module results +already printed at completion should not be repeated; when the caller suppresses +those completion lines, their final module results remain available. Full test +diagnostics, process stdout/stderr, and artifact paths remain available. + +Cursor-capable interactive rendering, result visibility selection, cancellation, +retry accounting, zero-test policy, and the distinction between failed tests and +host/handshake errors are unchanged. `--progress off` and +`MTP_PROGRESS_SILENCE_SECONDS=0` still disable heartbeat reporting; the existing +slow-test threshold/backoff is independent. No public API or wire-protocol change +is needed. + +### Producer-consumer boundary + +TestFx owns `Microsoft.Testing.Platform` and the terminal source under +`src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal`. +`dotnet/sdk` vendors that source into the outer `dotnet test` process. +The host and outer CLI are separately built/shipped consumers: an in-repository +source-linked test cannot establish that the outer SDK console changed. + +The SDK integration owner is responsible for porting the exact source revision, +aligning its explicit heartbeat default, and exercising the built SDK with packed +test hosts. Existing handshakes, intentionally absent handshakes, legacy fallback, +parent/child exit semantics, and multi-module aggregation must not change. +Reporter timers are owned by the existing progress terminal, stopped/joined on +completion/disposal, and reset for subsequent runs. + +Implementation targets `main`. No release-branch backport or downstream feature +enablement is authorized by this change alone; the coordinating CI-output owner +retains rollout and servicing responsibility. + +## Research and experiments + +- 2026-10-30: `SilenceDrivenHeartbeatRenderer.OnTestCompleted` resets the same + clock used by heartbeat emission, including when result visibility hides the + completed test. Its totals scan only active worker slots, which + `TestProgressStateAwareTerminal.RemoveWorker` clears. +- 2026-10-30: `TerminalTestReporter.Summary` prints all artifacts before the + verdict, and all module results again before the aggregate counts. + `ErroredAssemblies` and `Handshake` already retain complete actionable + diagnostics; reuse them rather than introducing a second reporting pipeline. +- 2026-10-30: The working tree and refreshed `origin/main` both resolve to the + baseline above; no open terminal-reporter PR overlaps this work. +- 2026-10-30: Initial build launches could not find Windows PowerShell because + the inherited PATH exceeded `cmd.exe`'s limit. A short process-local PATH + containing the pinned dotnet, Windows PowerShell, System32, Git, and the active + PowerShell installation allows the unmodified repository build/pack scripts + and package verifier to succeed. No global setting or build source changed. +- 2026-10-30: A first external-consumer build put its isolated NuGet cache under + the project directory; SDK default items then exposed other-TFM adapter + assemblies as reference candidates. Moving the task-owned cache outside the + consumer project fixed the incompatible-reference build without changing + package content or target frameworks. Neither setup failure is regression + evidence. + +## Alternatives and decision + +- **Keep completion-driven silence:** lowest code churn, but hidden successful + tests can suppress visible progress indefinitely. Rejected. +- **Unconditional periodic output:** solves silence but duplicates useful + visible diagnostics during active logging. Prefer a visible-output silence + deadline, independent of the completion-age clock. +- **Count only active worker slots:** cheap, but totals decrease as modules + finish. Read cumulative reporter-owned assembly state when a heartbeat is due. +- **Suppress successful modules and artifact paths entirely:** quieter but loses + diagnostic/navigation information. Instead remove duplicate success recaps and + put complete artifact detail after the verdict and failures. +- **Change every terminal mode:** unnecessary compatibility cost. Preserve + cursor-capable output and apply the summary ordering to non-cursor modes. + +No new option or general progress abstraction is planned. The existing threshold +override, renderer, summary sections, and per-run state supply the needed seams. + +## Validation and demonstration + +The pinned SDK is `12.0.100-alpha.1.26509.101`, with .NET `8.0.32` for the +focused Debug/net8.0 executions. + +- Unchanged baseline: 361 reporter/output-device cases passed, none skipped. +- Implementation: 370 cases passed, none skipped, including exact-output + failure-first summaries, completed worker-slot aggregation, 59/60-second + boundaries with hidden results, visible-output suppression, completion-age + preservation, and session reset. Existing cursor snapshots stayed green. +- The standalone terminal-contract consumer builds with zero warnings/errors. +- The owning project's `UpdateXlf` generated all 13 catalogs; the localization + guard validated all 364 repository catalogs. +- The repository build script packed and validated + `Microsoft.Testing.Platform.2.6.0-preview.26530.102.nupkg`; the isolated baseline + package is `2.6.0-preview.26530.101`. These are task-local comparison versions, + not published package versions. + +The same behavioral tests will be retained against baseline production behavior +in the isolated comparison. Packed-host before/after captures and assertion-level +red/green results will be added after execution; they are not yet claimed here. + +The owning unit-test assembly uses MSTest method-level parallelism with one +worker per processor. New renderer tests use per-test clocks and consoles, not +shared environment/console mutation; reporter refresher threads must be joined +before assertions or cleanup. Packed consumers use task-owned directories/caches. + +Executed evidence and the exact implementation revision will be added after the +comparison runs. Native SDK composed-product evidence is owned by the coordinated +SDK PR and remains separate from TestFx-local proof. + +## Open questions + +- Exact package/source pair and native SDK validation results are pending. +- Supported release-branch servicing is a coordinator decision after composed + validation; no claim of cross-repository completion is made here. diff --git a/docs/glossary.md b/docs/glossary.md index beb954da55..0bc8fba752 100644 --- a/docs/glossary.md +++ b/docs/glossary.md @@ -498,16 +498,29 @@ A sealed class (`Microsoft.VisualStudio.TestTools.UnitTesting.PlannedTest`, curr ### --progress -An MTP terminal-reporter command-line option that controls whether animated progress output is shown during a test run. Accepts three values: +An MTP terminal-reporter command-line option that controls progress output during a test run. Accepts three values: | Value | Behavior | | --- | --- | -| `auto` (default) | Show progress unless the terminal cannot update in place (non-ANSI/simple terminal), or the session is a test-host controller, `--list-tests`, or server mode | -| `on` | Same as `auto` (a dedicated heartbeat renderer for non-cursor modes is tracked separately) | +| `auto` (default) | Update progress in place on cursor-capable terminals; emit bounded durable progress on non-cursor terminals. Test-host controllers, `--list-tests`, and server mode do not render progress. | +| `on` | Same as `auto` | | `off` | Suppress all progress output | Introduced in [PR #9145](https://github.com/microsoft/testfx/pull/9145) as a replacement for the former `--no-progress` flag. `--no-progress` continues to work as a deprecated alias that routes to `--progress off`; outside of CI it emits a one-per-process deprecation warning on stderr. The warning is suppressed in CI environments, where it would be invisible noise and where build infrastructure (such as the Arcade SDK test runner) passes `--no-progress` unconditionally. `--progress` always wins when both are supplied. +On CI, piped, and redirected non-cursor terminals, a progress line is emitted after +60 seconds without visible reporter output. Hidden passing results do not postpone +it. The line reports cumulative completed/failed counts, active modules, and the +age of the last test completion (or that no test has completed yet); a heartbeat +does not imply that work completed. `MTP_PROGRESS_SILENCE_SECONDS` overrides this +interval and `0` disables it. Slow-test notices retain their independent +`MTP_PROGRESS_SLOW_TEST_SECONDS` threshold and exponential backoff. + +Non-cursor run summaries place the verdict, aggregate counts, and failures before +artifact paths. Successful module results already printed at completion are not +repeated in the final summary. Artifact paths and failure diagnostics remain +available in full; cursor-capable interactive output is unchanged. + ### PropertyBag An MTP class (`Microsoft.Testing.Platform.Extensions.Messages.PropertyBag`) that holds a typed collection of `IProperty` instances attached to a [TestNode](#testnode). Extension authors populate a `PropertyBag` with properties such as `TimingProperty`, `TestFileLocationProperty`, and `TestMetadataProperty` to communicate rich metadata about a test to the platform and to other extensions. A `PropertyBag` enforces that at most one `TestNodeStateProperty` may be present at a time. diff --git a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/IProgressRenderer.cs b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/IProgressRenderer.cs index 34af9540f7..576ee23bcc 100644 --- a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/IProgressRenderer.cs +++ b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/IProgressRenderer.cs @@ -52,7 +52,8 @@ void OnWrite( TerminalProgressMessageState[]? messages = null); /// - /// Notifies the renderer that a test completed. Used by the heartbeat renderer to reset its silence timer. + /// Notifies the renderer that a test completed. Used by the heartbeat renderer to report completion age, + /// independently of whether that result produced visible output. /// MUST be thread-safe. /// void OnTestCompleted(); diff --git a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/SilenceDrivenHeartbeatRenderer.cs b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/SilenceDrivenHeartbeatRenderer.cs index e927869c83..9c96bd930d 100644 --- a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/SilenceDrivenHeartbeatRenderer.cs +++ b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/SilenceDrivenHeartbeatRenderer.cs @@ -11,10 +11,10 @@ namespace Microsoft.Testing.Platform.OutputDevice.Terminal; /// i.e. CI / piped / file-redirected output). Instead of redrawing a progress block in place, it emits /// single, durable scrollback lines and only when there is a reason to: /// -/// E1 silence heartbeat — one summary line when no test completed for the silence threshold. +/// E1 silence heartbeat — one summary line when no visible output was written for the silence threshold. /// E2 slow-test surfacing — one line per test that exceeds the slow-test threshold, with exponential backoff. /// -/// A healthy fast suite emits zero heartbeat lines. +/// Hidden test results do not postpone visible progress. /// [UnsupportedOSPlatform("browser")] [Embedded] @@ -23,6 +23,7 @@ internal sealed class SilenceDrivenHeartbeatRenderer : IProgressRenderer private readonly TimeSpan _silenceThreshold; private readonly TimeSpan _slowTestThreshold; private readonly Func _createStopwatch; + private readonly Func>? _getTestRuns; // Per running-test backoff state: test detail id -> next elapsed threshold at which to emit. // Only touched from the single rendering thread inside OnTick. @@ -35,15 +36,21 @@ internal sealed class SilenceDrivenHeartbeatRenderer : IProgressRenderer private IStopwatch? _clock; - // Ticks (on _clock's timeline) of the last activity (test completion) or last heartbeat emission. - // Read/written from multiple threads, so guarded with Interlocked. - private long _lastActivityTicks; + private long _lastVisibleOutputTicks; - public SilenceDrivenHeartbeatRenderer(TimeSpan silenceThreshold, TimeSpan slowTestThreshold, Func createStopwatch) + // Completion notifications arrive outside the rendering lock. -1 means no completion in this run. + private long _lastCompletionTicks = -1; + + public SilenceDrivenHeartbeatRenderer( + TimeSpan silenceThreshold, + TimeSpan slowTestThreshold, + Func createStopwatch, + Func>? getTestRuns = null) { _silenceThreshold = silenceThreshold; _slowTestThreshold = slowTestThreshold; _createStopwatch = createStopwatch; + _getTestRuns = getTestRuns; } // The heartbeat rules only need second-level granularity, so we tick once per second instead of the @@ -61,19 +68,23 @@ public void OnStart() _slowTestThresholdStates.Clear(); IStopwatch clock = _createStopwatch(); Volatile.Write(ref _clock, clock); - Interlocked.Exchange(ref _lastActivityTicks, clock.Elapsed.Ticks); + _lastVisibleOutputTicks = clock.Elapsed.Ticks; + Interlocked.Exchange(ref _lastCompletionTicks, -1); } public void OnTestCompleted() - => Interlocked.Exchange(ref _lastActivityTicks, NowTicks); + => Interlocked.Exchange(ref _lastCompletionTicks, NowTicks); public void OnWrite( ITerminal terminal, TestProgressState?[] progressItems, Action write, TerminalProgressMessageState[]? messages = null) + { // Heartbeat lines are durable scrollback; a user write does not need to erase or re-render any progress. - => write(terminal); + write(terminal); + _lastVisibleOutputTicks = NowTicks; + } public void OnTick(ITerminal terminal, TestProgressState?[] progressItems, TerminalProgressMessageState[]? messages = null) { @@ -89,19 +100,24 @@ private void EmitSilenceHeartbeat(ITerminal terminal, TestProgressState?[] progr } long now = NowTicks; - long last = Interlocked.Read(ref _lastActivityTicks); - if (now - last < _silenceThreshold.Ticks) + if (now - _lastVisibleOutputTicks < _silenceThreshold.Ticks) { return; } // Reset the baseline so that, during a prolonged silence, the heartbeat repeats once per threshold interval. - Interlocked.Exchange(ref _lastActivityTicks, now); + _lastVisibleOutputTicks = now; int completed = 0; int failed = 0; - string? activeTest = null; - foreach (TestProgressState? item in progressItems) + // The reporter retains completed assemblies after their worker slots are freed. + IEnumerable testRuns = progressItems; + if (_getTestRuns is not null) + { + testRuns = _getTestRuns(); + } + + foreach (TestProgressState? item in testRuns) { if (item is null) { @@ -110,7 +126,18 @@ private void EmitSilenceHeartbeat(ITerminal terminal, TestProgressState?[] progr completed += item.TotalTests; failed += item.FailedTests; + } + + int activeModules = 0; + string? activeTest = null; + foreach (TestProgressState? item in progressItems) + { + if (item is null) + { + continue; + } + activeModules++; if (activeTest is null) { TestDetailState? active = item.TestNodeResultsState?.GetSingleActiveOrSummaryTask(); @@ -121,7 +148,14 @@ private void EmitSilenceHeartbeat(ITerminal terminal, TestProgressState?[] progr } } - string line = string.Format(CultureInfo.CurrentCulture, TerminalResources.TerminalProgressHeartbeat, completed, failed); + string line = string.Format(CultureInfo.CurrentCulture, TerminalResources.TerminalProgressHeartbeat, completed, failed, activeModules); + long lastCompletion = Interlocked.Read(ref _lastCompletionTicks); + line += lastCompletion < 0 + ? TerminalResources.TerminalProgressHeartbeatNoCompletionSuffix + : string.Format( + CultureInfo.CurrentCulture, + TerminalResources.TerminalProgressHeartbeatLastCompletionSuffix, + HumanReadableDurationFormatter.Render(TimeSpan.FromTicks(Math.Max(0, now - lastCompletion)), wrapInParentheses: false)); if (activeTest is not null) { line += string.Format(CultureInfo.CurrentCulture, TerminalResources.TerminalProgressHeartbeatActiveSuffix, activeTest); @@ -175,6 +209,7 @@ private void EmitSlowTests(ITerminal terminal, TestProgressState?[] progressItem // tick (GC pause, debugger break, CPU starvation) does not under-report the runtime. string duration = HumanReadableDurationFormatter.Render(elapsed, wrapInParentheses: false); terminal.AppendLine(string.Format(CultureInfo.CurrentCulture, TerminalResources.TerminalProgressSlowTest, duration, BuildSlowTestDescription(item, detail))); + _lastVisibleOutputTicks = NowTicks; } } } diff --git a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalResources.cs b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalResources.cs index 427857b6e9..71bf7bc560 100644 --- a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalResources.cs +++ b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalResources.cs @@ -217,6 +217,10 @@ internal static partial class TerminalResources internal static string @TerminalProgressHeartbeatActiveSuffix => GetResourceString("TerminalProgressHeartbeatActiveSuffix"); + internal static string @TerminalProgressHeartbeatLastCompletionSuffix => GetResourceString("TerminalProgressHeartbeatLastCompletionSuffix"); + + internal static string @TerminalProgressHeartbeatNoCompletionSuffix => GetResourceString("TerminalProgressHeartbeatNoCompletionSuffix"); + internal static string @TerminalProgressOptionDescription => GetResourceString("TerminalProgressOptionDescription"); internal static string @TerminalProgressOptionInvalidArgument => GetResourceString("TerminalProgressOptionInvalidArgument"); diff --git a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalResources.resx b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalResources.resx index 57a17f1935..77721cf92e 100644 --- a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalResources.resx +++ b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalResources.resx @@ -242,8 +242,15 @@ This option takes precedence over the deprecated --no-progress flag. {Locked="--progress"}{Locked="auto"}{Locked="on"}{Locked="true"}{Locked="enable"}{Locked="1"}{Locked="off"}{Locked="false"}{Locked="disable"}{Locked="0"} - running... {0} completed, {1} failed - Heartbeat line emitted on non-cursor terminals when the run goes silent. {0} is the number of completed tests, {1} is the number of failed tests. + running... {0} completed, {1} failed, active modules: {2} + Progress line emitted after visible-output silence on non-cursor terminals. {0} is the cumulative number of completed tests, {1} is the number of failed tests, {2} is the number of active test modules. + + + | last completion: {0} ago + Suffix for a progress line. {0} is the elapsed duration since the last test completion, not since the last progress line. + + + | no tests completed yet | active: {0} diff --git a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporter.Summary.cs b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporter.Summary.cs index 16360337a6..15fa0f32a8 100644 --- a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporter.Summary.cs +++ b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporter.Summary.cs @@ -9,6 +9,57 @@ namespace Microsoft.Testing.Platform.OutputDevice.Terminal; internal sealed partial class TerminalTestReporter { private void AppendTestRunSummary(ITerminal terminal) + { + List assemblies = [.. _assemblies.Values.OrderBy(static a => a.Id)]; + if (!_useCompactSummary) + { + AppendTestRunArtifacts(terminal); + } + + terminal.AppendLine(); + + // Retry attempts leave their subset verdict/counts to the reconciled orchestrator summary. + if (_options.ShowRunSummary) + { + AppendTestRunResult(terminal, assemblies); + } + + if (_useCompactSummary) + { + if (_options.ShowRunSummary && _options.ShowAssembly && assemblies.Count > 1) + { + AppendAssemblySummaries(terminal, assemblies.Where(static assembly => !assembly.Success)); + } + + AppendHandshakeFailureRecap(terminal); + AppendErroredAssemblyRecap(terminal); + + // Keep successful module details when they were not already printed at completion. + if (_options.ShowRunSummary && _options.ShowAssembly && !_options.ShowAssemblyStartAndComplete && assemblies.Count > 1) + { + AppendAssemblySummaries(terminal, assemblies.Where(static assembly => assembly.Success)); + } + } + + if (_options.ShowRunSummary) + { + AppendFlakyTests(terminal, assemblies); + } + + AppendSlowestTests(terminal, assemblies); + + if (_useCompactSummary) + { + AppendTestRunArtifacts(terminal); + } + else + { + AppendHandshakeFailureRecap(terminal); + AppendErroredAssemblyRecap(terminal); + } + } + + private void AppendTestRunArtifacts(ITerminal terminal) { IEnumerable> artifactGroups = _artifacts.GroupBy(a => a.OutOfProcess); if (_artifacts.Count > 0) @@ -37,22 +88,10 @@ private void AppendTestRunSummary(ITerminal terminal) terminal.AppendLine(); } } + } - terminal.AppendLine(); - - List assemblies = [.. _assemblies.Values.OrderBy(static a => a.Id)]; - - // Retry attempt (second or later): skip straight to the sections the orchestrator does not restate. The - // verdict and counts below would describe the filtered subset this attempt re-ran rather than the run, so - // the reconciled retry summary owns them instead. - if (!_options.ShowRunSummary) - { - AppendSlowestTests(terminal, assemblies); - AppendHandshakeFailureRecap(terminal); - AppendErroredAssemblyRecap(terminal); - return; - } - + private void AppendTestRunResult(ITerminal terminal, List assemblies) + { // Single-pass aggregation: compute all summary counters in one foreach instead of // 7 separate LINQ calls (Sum×5, Any×1, Count×1), saving 6 extra O(N) passes and // 7 LINQ enumerator allocations per test run. @@ -118,18 +157,10 @@ private void AppendTestRunSummary(ITerminal terminal) terminal.AppendLine(); - // For the dotnet test orchestrator (ShowAssembly) running more than one assembly, list each assembly with - // its own result + compact counts under the run-level verdict. Additive: the in-process host leaves - // ShowAssembly off, so this block never runs and its summary stays byte-identical. - if (_options.ShowAssembly && assemblies.Count > 1) + // Preserve the interactive module recap above the counts. Non-cursor summaries put failures first below. + if (!_useCompactSummary && _options.ShowAssembly && assemblies.Count > 1) { - foreach (TestProgressState assemblyRun in assemblies) - { - terminal.Append(SingleIndentation); - AppendAssemblySummary(assemblyRun, terminal); - } - - terminal.AppendLine(); + AppendAssemblySummaries(terminal, assemblies); } int total = totalTests; @@ -206,22 +237,27 @@ private void AppendTestRunSummary(ITerminal terminal) terminal.Append(durationText); AppendLongDuration(terminal, runDuration, wrapInParentheses: false, colorize: false); terminal.AppendLine(); + } - // Optional "Flaky tests" section (on by default, suppressed by --show-flaky-tests off). No-op when nothing - // was retried, so the summary stays byte-identical for a run without retries. - AppendFlakyTests(terminal, assemblies); - - // Optional "Slowest tests" section (opt-in via --show-slowest-tests). Additive: no-op when the feature is - // off, so the summary stays byte-identical for the default run. - AppendSlowestTests(terminal, assemblies); + private void AppendAssemblySummaries(ITerminal terminal, IEnumerable assemblies) + { + bool wroteAssembly = false; + foreach (TestProgressState assembly in assemblies) + { + if (_useCompactSummary && !wroteAssembly) + { + terminal.AppendLine(); + } - // Re-print any handshake failures (orchestrator-only) at the very end so they aren't lost above the summary. - // No-op for the in-process host, which never reports handshake failures. - AppendHandshakeFailureRecap(terminal); + terminal.Append(SingleIndentation); + AppendAssemblySummary(assembly, terminal); + wroteAssembly = true; + } - // Re-print any assemblies that errored (non-zero exit with no failed test) for the same reason: the inline - // process output is otherwise buried in the middle of a large run. No-op for the in-process host. - AppendErroredAssemblyRecap(terminal); + if (wroteAssembly) + { + terminal.AppendLine(); + } } /// diff --git a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporter.cs b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporter.cs index a0f8cdd5ee..43cd96f018 100644 --- a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporter.cs +++ b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporter.cs @@ -53,6 +53,8 @@ internal event EventHandler OnProgressStopUpdate private readonly TerminalTestReporterOptions _options; + private readonly bool _useCompactSummary; + private readonly TestProgressStateAwareTerminal _terminalWithProgress; #if NET9_0_OR_GREATER @@ -150,9 +152,10 @@ public TerminalTestReporter( useCursorRenderer = useAnsi; } + _useCompactSummary = !useCursorRenderer; IProgressRenderer renderer = useCursorRenderer ? new CursorProgressRenderer() - : new SilenceDrivenHeartbeatRenderer(_options.HeartbeatSilenceThreshold, _options.SlowTestThreshold, () => CreateStopwatch()); + : new SilenceDrivenHeartbeatRenderer(_options.HeartbeatSilenceThreshold, _options.SlowTestThreshold, () => CreateStopwatch(), () => _assemblies.Values); _terminalWithProgress = new TestProgressStateAwareTerminal(terminal, showProgress, renderer, logger); } diff --git a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporterOptions.cs b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporterOptions.cs index ba5b89ac0a..8180ec2165 100644 --- a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporterOptions.cs +++ b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporterOptions.cs @@ -36,8 +36,8 @@ internal sealed class TerminalTestReporterOptions public Func HasTestSessionFailure { get; init; } = static () => false; /// - /// Gets a value indicating whether we should write the progress periodically to screen. When ANSI is allowed we update the progress as often as we can. - /// When ANSI is not allowed we never have progress. + /// Gets a value indicating whether we should write progress periodically to screen. Cursor-capable terminals + /// update in place; non-cursor terminals emit bounded progress lines after visible-output silence. /// This is a callback to nullable bool, because we don't know if we are running as test host controller until after we setup the console. So we should be polling for the value, until we get non-null boolean /// and then cache that value. /// @@ -77,10 +77,10 @@ internal sealed class TerminalTestReporterOptions public OutputShowMode ShowStderr { get; init; } = OutputShowMode.All; /// - /// Gets the silence threshold for the non-cursor heartbeat renderer (E1). When no test completes for this - /// duration, a single heartbeat line is emitted. disables the silence heartbeat. + /// Gets the visible-output silence threshold for the non-cursor heartbeat renderer (E1). Hidden test + /// completions do not reset this interval. disables the silence heartbeat. /// - public TimeSpan HeartbeatSilenceThreshold { get; init; } = TimeSpan.FromSeconds(30); + public TimeSpan HeartbeatSilenceThreshold { get; init; } = TimeSpan.FromSeconds(60); /// /// Gets the per-test threshold for the non-cursor heartbeat renderer (E2). When a single test exceeds this diff --git a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestProgressStateAwareTerminal.cs b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestProgressStateAwareTerminal.cs index 6439d3523a..d0405762d6 100644 --- a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestProgressStateAwareTerminal.cs +++ b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestProgressStateAwareTerminal.cs @@ -315,7 +315,14 @@ internal void UpdateProgressMessage( try { _terminal.StartUpdate(); - _terminal.AppendLine(message); + if (_renderer is SilenceDrivenHeartbeatRenderer) + { + _renderer.OnWrite(_terminal, _progressItems, terminal => terminal.AppendLine(message)); + } + else + { + _terminal.AppendLine(message); + } } finally { diff --git a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.cs.xlf b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.cs.xlf index 7326ce727c..23d6cb8ab3 100644 --- a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.cs.xlf +++ b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.cs.xlf @@ -481,15 +481,25 @@ Platné hodnoty jsou Minimal, Normal a Detailed. Výchozí hodnota je Normal. K {Locked="--output"}{Locked="Minimal"}{Locked="Normal"}{Locked="Detailed"} - running... {0} completed, {1} failed - spuštěno... {0} dokončeno, {1} neúspěšné - Heartbeat line emitted on non-cursor terminals when the run goes silent. {0} is the number of completed tests, {1} is the number of failed tests. + running... {0} completed, {1} failed, active modules: {2} + running... {0} completed, {1} failed, active modules: {2} + Progress line emitted after visible-output silence on non-cursor terminals. {0} is the cumulative number of completed tests, {1} is the number of failed tests, {2} is the number of active test modules. | active: {0} | aktivní: {0} Suffix appended to the heartbeat line naming the currently active test. {0} is the active test name. + + | last completion: {0} ago + | last completion: {0} ago + Suffix for a progress line. {0} is the elapsed duration since the last test completion, not since the last progress line. + + + | no tests completed yet + | no tests completed yet + + Control whether progress is reported to screen. Valid values are 'auto' (default), 'on' (also accepts 'true', 'enable', '1') or 'off' (also accepts 'false', 'disable', '0'). diff --git a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.de.xlf b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.de.xlf index 98cea3fada..b31be27d32 100644 --- a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.de.xlf +++ b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.de.xlf @@ -481,15 +481,25 @@ Gültige Werte sind 'Minimal', 'Normal' und 'Detailed'. Der Standardwert ist 'No {Locked="--output"}{Locked="Minimal"}{Locked="Normal"}{Locked="Detailed"} - running... {0} completed, {1} failed - wird ausgeführt... {0} abgeschlossen, {1} fehlgeschlagen - Heartbeat line emitted on non-cursor terminals when the run goes silent. {0} is the number of completed tests, {1} is the number of failed tests. + running... {0} completed, {1} failed, active modules: {2} + running... {0} completed, {1} failed, active modules: {2} + Progress line emitted after visible-output silence on non-cursor terminals. {0} is the cumulative number of completed tests, {1} is the number of failed tests, {2} is the number of active test modules. | active: {0} | aktiv: {0} Suffix appended to the heartbeat line naming the currently active test. {0} is the active test name. + + | last completion: {0} ago + | last completion: {0} ago + Suffix for a progress line. {0} is the elapsed duration since the last test completion, not since the last progress line. + + + | no tests completed yet + | no tests completed yet + + Control whether progress is reported to screen. Valid values are 'auto' (default), 'on' (also accepts 'true', 'enable', '1') or 'off' (also accepts 'false', 'disable', '0'). diff --git a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.es.xlf b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.es.xlf index a65da49ac7..7d075af619 100644 --- a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.es.xlf +++ b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.es.xlf @@ -481,15 +481,25 @@ Los valores válidos son 'Minimal', 'Normal', 'Detailed'. El valor predeterminad {Locked="--output"}{Locked="Minimal"}{Locked="Normal"}{Locked="Detailed"} - running... {0} completed, {1} failed - ejecutando... {0} completado, {1} error - Heartbeat line emitted on non-cursor terminals when the run goes silent. {0} is the number of completed tests, {1} is the number of failed tests. + running... {0} completed, {1} failed, active modules: {2} + running... {0} completed, {1} failed, active modules: {2} + Progress line emitted after visible-output silence on non-cursor terminals. {0} is the cumulative number of completed tests, {1} is the number of failed tests, {2} is the number of active test modules. | active: {0} | activo: {0} Suffix appended to the heartbeat line naming the currently active test. {0} is the active test name. + + | last completion: {0} ago + | last completion: {0} ago + Suffix for a progress line. {0} is the elapsed duration since the last test completion, not since the last progress line. + + + | no tests completed yet + | no tests completed yet + + Control whether progress is reported to screen. Valid values are 'auto' (default), 'on' (also accepts 'true', 'enable', '1') or 'off' (also accepts 'false', 'disable', '0'). diff --git a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.fr.xlf b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.fr.xlf index cb8a6bd1a5..2032d47450 100644 --- a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.fr.xlf +++ b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.fr.xlf @@ -481,15 +481,25 @@ Les valeurs valides sont 'Minimal', 'Normal', 'Detailed'. La valeur par défaut {Locked="--output"}{Locked="Minimal"}{Locked="Normal"}{Locked="Detailed"} - running... {0} completed, {1} failed - Exécution en cours... {0} terminés, {1} en échec - Heartbeat line emitted on non-cursor terminals when the run goes silent. {0} is the number of completed tests, {1} is the number of failed tests. + running... {0} completed, {1} failed, active modules: {2} + running... {0} completed, {1} failed, active modules: {2} + Progress line emitted after visible-output silence on non-cursor terminals. {0} is the cumulative number of completed tests, {1} is the number of failed tests, {2} is the number of active test modules. | active: {0} | actif : {0} Suffix appended to the heartbeat line naming the currently active test. {0} is the active test name. + + | last completion: {0} ago + | last completion: {0} ago + Suffix for a progress line. {0} is the elapsed duration since the last test completion, not since the last progress line. + + + | no tests completed yet + | no tests completed yet + + Control whether progress is reported to screen. Valid values are 'auto' (default), 'on' (also accepts 'true', 'enable', '1') or 'off' (also accepts 'false', 'disable', '0'). diff --git a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.it.xlf b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.it.xlf index 3317355485..37c034dba0 100644 --- a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.it.xlf +++ b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.it.xlf @@ -481,15 +481,25 @@ I valori validi sono 'Minimal', 'Normal' e 'Detailed'. L'impostazione predefinit {Locked="--output"}{Locked="Minimal"}{Locked="Normal"}{Locked="Detailed"} - running... {0} completed, {1} failed - in esecuzione... {0} completati, {1} non riusciti - Heartbeat line emitted on non-cursor terminals when the run goes silent. {0} is the number of completed tests, {1} is the number of failed tests. + running... {0} completed, {1} failed, active modules: {2} + running... {0} completed, {1} failed, active modules: {2} + Progress line emitted after visible-output silence on non-cursor terminals. {0} is the cumulative number of completed tests, {1} is the number of failed tests, {2} is the number of active test modules. | active: {0} | attivo: {0} Suffix appended to the heartbeat line naming the currently active test. {0} is the active test name. + + | last completion: {0} ago + | last completion: {0} ago + Suffix for a progress line. {0} is the elapsed duration since the last test completion, not since the last progress line. + + + | no tests completed yet + | no tests completed yet + + Control whether progress is reported to screen. Valid values are 'auto' (default), 'on' (also accepts 'true', 'enable', '1') or 'off' (also accepts 'false', 'disable', '0'). diff --git a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.ja.xlf b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.ja.xlf index 78fdb6981a..a1e6adc15a 100644 --- a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.ja.xlf +++ b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.ja.xlf @@ -481,15 +481,25 @@ Valid values are 'Minimal', 'Normal', 'Detailed'. Default is 'Normal'. Use '--sh {Locked="--output"}{Locked="Minimal"}{Locked="Normal"}{Locked="Detailed"} - running... {0} completed, {1} failed - 実行中... {0} 件完了、{1} 件失敗 - Heartbeat line emitted on non-cursor terminals when the run goes silent. {0} is the number of completed tests, {1} is the number of failed tests. + running... {0} completed, {1} failed, active modules: {2} + running... {0} completed, {1} failed, active modules: {2} + Progress line emitted after visible-output silence on non-cursor terminals. {0} is the cumulative number of completed tests, {1} is the number of failed tests, {2} is the number of active test modules. | active: {0} | アクティブ: {0} Suffix appended to the heartbeat line naming the currently active test. {0} is the active test name. + + | last completion: {0} ago + | last completion: {0} ago + Suffix for a progress line. {0} is the elapsed duration since the last test completion, not since the last progress line. + + + | no tests completed yet + | no tests completed yet + + Control whether progress is reported to screen. Valid values are 'auto' (default), 'on' (also accepts 'true', 'enable', '1') or 'off' (also accepts 'false', 'disable', '0'). diff --git a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.ko.xlf b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.ko.xlf index 731eeb6e11..efbb7bfd39 100644 --- a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.ko.xlf +++ b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.ko.xlf @@ -481,15 +481,25 @@ Valid values are 'Minimal', 'Normal', 'Detailed'. Default is 'Normal'. Use '--sh {Locked="--output"}{Locked="Minimal"}{Locked="Normal"}{Locked="Detailed"} - running... {0} completed, {1} failed - 실행 중... {0} 완료, {1} 실패 - Heartbeat line emitted on non-cursor terminals when the run goes silent. {0} is the number of completed tests, {1} is the number of failed tests. + running... {0} completed, {1} failed, active modules: {2} + running... {0} completed, {1} failed, active modules: {2} + Progress line emitted after visible-output silence on non-cursor terminals. {0} is the cumulative number of completed tests, {1} is the number of failed tests, {2} is the number of active test modules. | active: {0} | 활성: {0} Suffix appended to the heartbeat line naming the currently active test. {0} is the active test name. + + | last completion: {0} ago + | last completion: {0} ago + Suffix for a progress line. {0} is the elapsed duration since the last test completion, not since the last progress line. + + + | no tests completed yet + | no tests completed yet + + Control whether progress is reported to screen. Valid values are 'auto' (default), 'on' (also accepts 'true', 'enable', '1') or 'off' (also accepts 'false', 'disable', '0'). diff --git a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.pl.xlf b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.pl.xlf index e3565c82e1..55be221b8f 100644 --- a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.pl.xlf +++ b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.pl.xlf @@ -481,15 +481,25 @@ Prawidłowe wartości to 'Minimal', 'Normal', or 'Detailed'. Wartość domyślna {Locked="--output"}{Locked="Minimal"}{Locked="Normal"}{Locked="Detailed"} - running... {0} completed, {1} failed - Trwa uruchamianie... Ukończone: {0}, nieudane: {1} - Heartbeat line emitted on non-cursor terminals when the run goes silent. {0} is the number of completed tests, {1} is the number of failed tests. + running... {0} completed, {1} failed, active modules: {2} + running... {0} completed, {1} failed, active modules: {2} + Progress line emitted after visible-output silence on non-cursor terminals. {0} is the cumulative number of completed tests, {1} is the number of failed tests, {2} is the number of active test modules. | active: {0} | aktywny: {0} Suffix appended to the heartbeat line naming the currently active test. {0} is the active test name. + + | last completion: {0} ago + | last completion: {0} ago + Suffix for a progress line. {0} is the elapsed duration since the last test completion, not since the last progress line. + + + | no tests completed yet + | no tests completed yet + + Control whether progress is reported to screen. Valid values are 'auto' (default), 'on' (also accepts 'true', 'enable', '1') or 'off' (also accepts 'false', 'disable', '0'). diff --git a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.pt-BR.xlf b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.pt-BR.xlf index eb513df479..3dbe906225 100644 --- a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.pt-BR.xlf +++ b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.pt-BR.xlf @@ -481,15 +481,25 @@ Os valores válidos são ''Minimal'', ''Normal'' e ''Detailed''. O padrão é '' {Locked="--output"}{Locked="Minimal"}{Locked="Normal"}{Locked="Detailed"} - running... {0} completed, {1} failed - em execução... {0} concluído, {1} falhou - Heartbeat line emitted on non-cursor terminals when the run goes silent. {0} is the number of completed tests, {1} is the number of failed tests. + running... {0} completed, {1} failed, active modules: {2} + running... {0} completed, {1} failed, active modules: {2} + Progress line emitted after visible-output silence on non-cursor terminals. {0} is the cumulative number of completed tests, {1} is the number of failed tests, {2} is the number of active test modules. | active: {0} | ativo: {0} Suffix appended to the heartbeat line naming the currently active test. {0} is the active test name. + + | last completion: {0} ago + | last completion: {0} ago + Suffix for a progress line. {0} is the elapsed duration since the last test completion, not since the last progress line. + + + | no tests completed yet + | no tests completed yet + + Control whether progress is reported to screen. Valid values are 'auto' (default), 'on' (also accepts 'true', 'enable', '1') or 'off' (also accepts 'false', 'disable', '0'). diff --git a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.ru.xlf b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.ru.xlf index 29e3d43e8a..7ce6a4629a 100644 --- a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.ru.xlf +++ b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.ru.xlf @@ -481,15 +481,25 @@ Valid values are 'Minimal', 'Normal', 'Detailed'. Default is 'Normal'. Use '--sh {Locked="--output"}{Locked="Minimal"}{Locked="Normal"}{Locked="Detailed"} - running... {0} completed, {1} failed - запущено... выполнено: {0}, сбой: {1} - Heartbeat line emitted on non-cursor terminals when the run goes silent. {0} is the number of completed tests, {1} is the number of failed tests. + running... {0} completed, {1} failed, active modules: {2} + running... {0} completed, {1} failed, active modules: {2} + Progress line emitted after visible-output silence on non-cursor terminals. {0} is the cumulative number of completed tests, {1} is the number of failed tests, {2} is the number of active test modules. | active: {0} | активно: {0} Suffix appended to the heartbeat line naming the currently active test. {0} is the active test name. + + | last completion: {0} ago + | last completion: {0} ago + Suffix for a progress line. {0} is the elapsed duration since the last test completion, not since the last progress line. + + + | no tests completed yet + | no tests completed yet + + Control whether progress is reported to screen. Valid values are 'auto' (default), 'on' (also accepts 'true', 'enable', '1') or 'off' (also accepts 'false', 'disable', '0'). diff --git a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.tr.xlf b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.tr.xlf index 3cc33a967b..a1cb55ba54 100644 --- a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.tr.xlf +++ b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.tr.xlf @@ -481,15 +481,25 @@ Geçerli değerler: 'Minimal', 'Normal', 'Detailed'. Varsayılan değer: 'Normal {Locked="--output"}{Locked="Minimal"}{Locked="Normal"}{Locked="Detailed"} - running... {0} completed, {1} failed - çalışıyor... {0} tamamlandı, {1} başarısız - Heartbeat line emitted on non-cursor terminals when the run goes silent. {0} is the number of completed tests, {1} is the number of failed tests. + running... {0} completed, {1} failed, active modules: {2} + running... {0} completed, {1} failed, active modules: {2} + Progress line emitted after visible-output silence on non-cursor terminals. {0} is the cumulative number of completed tests, {1} is the number of failed tests, {2} is the number of active test modules. | active: {0} | etkin: {0} Suffix appended to the heartbeat line naming the currently active test. {0} is the active test name. + + | last completion: {0} ago + | last completion: {0} ago + Suffix for a progress line. {0} is the elapsed duration since the last test completion, not since the last progress line. + + + | no tests completed yet + | no tests completed yet + + Control whether progress is reported to screen. Valid values are 'auto' (default), 'on' (also accepts 'true', 'enable', '1') or 'off' (also accepts 'false', 'disable', '0'). diff --git a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.zh-Hans.xlf b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.zh-Hans.xlf index ca103d4c87..278a26d5ef 100644 --- a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.zh-Hans.xlf +++ b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.zh-Hans.xlf @@ -481,15 +481,25 @@ Valid values are 'Minimal', 'Normal', 'Detailed'. Default is 'Normal'. Use '--sh {Locked="--output"}{Locked="Minimal"}{Locked="Normal"}{Locked="Detailed"} - running... {0} completed, {1} failed - 正在运行... {0} 个已完成, {1} 个失败 - Heartbeat line emitted on non-cursor terminals when the run goes silent. {0} is the number of completed tests, {1} is the number of failed tests. + running... {0} completed, {1} failed, active modules: {2} + running... {0} completed, {1} failed, active modules: {2} + Progress line emitted after visible-output silence on non-cursor terminals. {0} is the cumulative number of completed tests, {1} is the number of failed tests, {2} is the number of active test modules. | active: {0} | 活动: {0} Suffix appended to the heartbeat line naming the currently active test. {0} is the active test name. + + | last completion: {0} ago + | last completion: {0} ago + Suffix for a progress line. {0} is the elapsed duration since the last test completion, not since the last progress line. + + + | no tests completed yet + | no tests completed yet + + Control whether progress is reported to screen. Valid values are 'auto' (default), 'on' (also accepts 'true', 'enable', '1') or 'off' (also accepts 'false', 'disable', '0'). diff --git a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.zh-Hant.xlf b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.zh-Hant.xlf index d7c72ca4c0..fba128aa25 100644 --- a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.zh-Hant.xlf +++ b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/xlf/TerminalResources.zh-Hant.xlf @@ -481,15 +481,25 @@ Valid values are 'Minimal', 'Normal', 'Detailed'. Default is 'Normal'. Use '--sh {Locked="--output"}{Locked="Minimal"}{Locked="Normal"}{Locked="Detailed"} - running... {0} completed, {1} failed - 正在執行... {0} 已完成,{1} 已失敗 - Heartbeat line emitted on non-cursor terminals when the run goes silent. {0} is the number of completed tests, {1} is the number of failed tests. + running... {0} completed, {1} failed, active modules: {2} + running... {0} completed, {1} failed, active modules: {2} + Progress line emitted after visible-output silence on non-cursor terminals. {0} is the cumulative number of completed tests, {1} is the number of failed tests, {2} is the number of active test modules. | active: {0} | 作用中: {0} Suffix appended to the heartbeat line naming the currently active test. {0} is the active test name. + + | last completion: {0} ago + | last completion: {0} ago + Suffix for a progress line. {0} is the elapsed duration since the last test completion, not since the last progress line. + + + | no tests completed yet + | no tests completed yet + + Control whether progress is reported to screen. Valid values are 'auto' (default), 'on' (also accepts 'true', 'enable', '1') or 'off' (also accepts 'false', 'disable', '0'). diff --git a/src/Platform/Microsoft.Testing.Platform/OutputDevice/TerminalOutputDevice.Initialization.cs b/src/Platform/Microsoft.Testing.Platform/OutputDevice/TerminalOutputDevice.Initialization.cs index b71b091289..5ed75852a9 100644 --- a/src/Platform/Microsoft.Testing.Platform/OutputDevice/TerminalOutputDevice.Initialization.cs +++ b/src/Platform/Microsoft.Testing.Platform/OutputDevice/TerminalOutputDevice.Initialization.cs @@ -88,7 +88,7 @@ await _policiesService.RegisterOnAbortCallbackAsync( AnsiOverride.ForceOn => AnsiMode.ForceAnsi, // User explicitly disabled ANSI (`--ansi off`). - // Note that NoAnsi also implies no progress. + // Non-cursor progress is rendered as durable lines instead of in-place updates. AnsiOverride.ForceOff => AnsiMode.NoAnsi, // No --ansi argument was provided, or `--ansi auto` was provided. @@ -108,9 +108,8 @@ await _policiesService.RegisterOnAbortCallbackAsync( out string[]? progressArguments) && progressArguments is { Length: > 0 }; - // 'on' and 'auto' currently behave the same: progress is shown unless the terminal is not capable - // of in-place updates (NoAnsi/SimpleAnsi) or we are a test-host controller, --list-tests, or server - // mode. A dedicated heartbeat renderer for the non-cursor modes is tracked by #9125. + // 'on' and 'auto' use the renderer appropriate for the terminal. Test-host controllers, + // --list-tests and server mode do not render progress. bool noProgress = !TerminalTestReporterCommandLineOptionsProvider.IsProgressEnabled(_commandLineOptions); if (!progressOptionSet && _commandLineOptions.IsOptionSet(TerminalTestReporterCommandLineOptionsProvider.NoProgressOption)) @@ -158,7 +157,7 @@ await _policiesService.RegisterOnAbortCallbackAsync( ShowStdout = showStdout, ShowStderr = showStderr, HeartbeatSilenceThreshold = ProgressReportingConfiguration.GetThreshold( - _environment, ProgressReportingConfiguration.MTP_PROGRESS_SILENCE_SECONDS, defaultSeconds: 30), + _environment, ProgressReportingConfiguration.MTP_PROGRESS_SILENCE_SECONDS, defaultSeconds: 60), SlowTestThreshold = ProgressReportingConfiguration.GetThreshold( _environment, ProgressReportingConfiguration.MTP_PROGRESS_SLOW_TEST_SECONDS, defaultSeconds: 60), SlowestTestsCount = slowestTestsCount, diff --git a/test/UnitTests/Microsoft.Testing.Platform.UnitTests/OutputDevice/Terminal/SilenceDrivenHeartbeatRendererTests.cs b/test/UnitTests/Microsoft.Testing.Platform.UnitTests/OutputDevice/Terminal/SilenceDrivenHeartbeatRendererTests.cs index d4dbb66f0b..dc152b38d8 100644 --- a/test/UnitTests/Microsoft.Testing.Platform.UnitTests/OutputDevice/Terminal/SilenceDrivenHeartbeatRendererTests.cs +++ b/test/UnitTests/Microsoft.Testing.Platform.UnitTests/OutputDevice/Terminal/SilenceDrivenHeartbeatRendererTests.cs @@ -23,6 +23,7 @@ public void SilenceHeartbeat_WhenNoCompletionForThreshold_EmitsSingleSummaryLine TestProgressState asm = CreateAssembly(clock, totalTests: 5, failedTests: 2, activeTestName: "MyTest"); TestProgressState?[] items = [asm]; + renderer.OnTestCompleted(); // Below threshold: nothing. clock.Advance(TimeSpan.FromSeconds(29)); @@ -33,11 +34,11 @@ public void SilenceHeartbeat_WhenNoCompletionForThreshold_EmitsSingleSummaryLine clock.Advance(TimeSpan.FromSeconds(2)); renderer.OnTick(terminal, items); - Assert.Contains("running...", terminal.Output); - Assert.Contains("5 completed", terminal.Output); - Assert.Contains("2 failed", terminal.Output); - Assert.Contains("active: MyTest", terminal.Output); - Assert.AreEqual(1, terminal.LineCount); + const string expected = """ + running... 5 completed, 2 failed, active modules: 1 | last completion: 31s ago | active: MyTest + + """; + Assert.AreEqual(Normalize(expected), Normalize(terminal.Output)); } [TestMethod] @@ -66,22 +67,147 @@ public void SilenceHeartbeat_DuringProlongedSilence_RepeatsOncePerInterval() } [TestMethod] - public void SilenceHeartbeat_WhenCompletionsKeepHappening_DoesNotEmit() + public void VisibleSilence_HiddenCompletions_EmitAtDefaultBoundary() { var clock = new FakeClock(); var terminal = new RecordingStringTerminal(); - var renderer = new SilenceDrivenHeartbeatRenderer(Silence30s, Slow60s, clock.CreateStopwatch); + var renderer = new SilenceDrivenHeartbeatRenderer(new TerminalTestReporterOptions().HeartbeatSilenceThreshold, TimeSpan.Zero, clock.CreateStopwatch); renderer.OnStart(); - TestProgressState?[] items = [CreateAssembly(clock, totalTests: 1, failedTests: 0, activeTestName: null)]; + TestProgressState asm = CreateAssembly(clock, totalTests: 0, failedTests: 0, activeTestName: null); + TestProgressState?[] items = [asm]; clock.Advance(TimeSpan.FromSeconds(20)); + asm.ReportPassingTest("first", "First", "inst-1"); renderer.OnTestCompleted(); clock.Advance(TimeSpan.FromSeconds(20)); + asm.ReportPassingTest("second", "Second", "inst-1"); + renderer.OnTestCompleted(); + clock.Advance(TimeSpan.FromSeconds(19)); + asm.ReportPassingTest("third", "Third", "inst-1"); + renderer.OnTestCompleted(); renderer.OnTick(terminal, items); - - // Only 20s since the last completion, below the 30s silence threshold. Assert.AreEqual(string.Empty, terminal.Output); + + clock.Advance(TimeSpan.FromSeconds(1)); + renderer.OnTick(terminal, items); + + clock.Advance(TimeSpan.FromSeconds(59)); + asm.ReportPassingTest("fourth", "Fourth", "inst-1"); + renderer.OnTestCompleted(); + renderer.OnTick(terminal, items); + Assert.AreEqual(1, terminal.LineCount); + clock.Advance(TimeSpan.FromSeconds(1)); + renderer.OnTick(terminal, items); + + const string expected = """ + running... 3 completed, 0 failed, active modules: 1 | last completion: 1s ago + running... 4 completed, 0 failed, active modules: 1 | last completion: 1s ago + + """; + Assert.AreEqual(Normalize(expected), Normalize(terminal.Output)); + } + + [TestMethod] + public void VisibleSilence_VisibleWriteDelaysHeartbeatButNotCompletionAge() + { + var clock = new FakeClock(); + var terminal = new RecordingStringTerminal(); + var renderer = new SilenceDrivenHeartbeatRenderer(Silence30s, TimeSpan.Zero, clock.CreateStopwatch); + renderer.OnStart(); + renderer.OnTestCompleted(); + TestProgressState?[] items = [CreateAssembly(clock, 1, 0, null)]; + + clock.Advance(TimeSpan.FromSeconds(20)); + renderer.OnWrite(terminal, items, output => output.AppendLine("diagnostic")); + clock.Advance(TimeSpan.FromSeconds(29)); + renderer.OnTick(terminal, items); + Assert.AreEqual(1, terminal.LineCount); + + clock.Advance(TimeSpan.FromSeconds(1)); + renderer.OnTick(terminal, items); + clock.Advance(TimeSpan.FromSeconds(30)); + renderer.OnTick(terminal, items); + + const string expected = """ + diagnostic + running... 1 completed, 0 failed, active modules: 1 | last completion: 50s ago + running... 1 completed, 0 failed, active modules: 1 | last completion: 1m 20s ago + + """; + Assert.AreEqual(Normalize(expected), Normalize(terminal.Output)); + } + + [TestMethod] + public void VisibleSilence_NoCompletionsAndRestart_DoNotInventProgress() + { + var clock = new FakeClock(); + var terminal = new RecordingStringTerminal(); + var renderer = new SilenceDrivenHeartbeatRenderer(Silence30s, TimeSpan.Zero, clock.CreateStopwatch); + renderer.OnStart(); + + clock.Advance(TimeSpan.FromSeconds(30)); + renderer.OnTick(terminal, []); + renderer.OnTestCompleted(); + renderer.OnStart(); + clock.Advance(TimeSpan.FromSeconds(29)); + renderer.OnTick(terminal, []); + Assert.AreEqual(1, terminal.LineCount); + clock.Advance(TimeSpan.FromSeconds(1)); + renderer.OnTick(terminal, []); + + const string expected = """ + running... 0 completed, 0 failed, active modules: 0 | no tests completed yet + running... 0 completed, 0 failed, active modules: 0 | no tests completed yet + + """; + Assert.AreEqual(Normalize(expected), Normalize(terminal.Output)); + } + + [TestMethod] + public void VisibleSilence_CompletedModules_RemainInCumulativeCounts() + { + var clock = new FakeClock(); + var terminal = new RecordingStringTerminal(); + TestProgressState finished = CreateAssembly(clock, 3, 1, null); + TestProgressState active = CreateAssembly(clock, 2, 0, "ActiveTest"); + var renderer = new SilenceDrivenHeartbeatRenderer(Silence30s, TimeSpan.Zero, clock.CreateStopwatch, () => [finished, active]); + renderer.OnStart(); + renderer.OnTestCompleted(); + + clock.Advance(TimeSpan.FromSeconds(30)); + renderer.OnTick(terminal, [null, active]); + + const string expected = """ + running... 5 completed, 1 failed, active modules: 1 | last completion: 30s ago | active: ActiveTest + + """; + Assert.AreEqual(Normalize(expected), Normalize(terminal.Output)); + } + + [TestMethod] + public void VisibleSilence_ProgressMessage_PostponesHeartbeat() + { + var clock = new FakeClock(); + var terminal = new RecordingStringTerminal(); + var renderer = new SilenceDrivenHeartbeatRenderer(Silence30s, TimeSpan.Zero, clock.CreateStopwatch); + using var progress = new TestProgressStateAwareTerminal(terminal, () => true, renderer); + renderer.OnStart(); + + clock.Advance(TimeSpan.FromSeconds(20)); + progress.UpdateProgressMessage("run", "instance", "producer", "key", "Preparing tests"); + clock.Advance(TimeSpan.FromSeconds(29)); + renderer.OnTick(terminal, []); + Assert.AreEqual(1, terminal.LineCount); + clock.Advance(TimeSpan.FromSeconds(1)); + renderer.OnTick(terminal, []); + + const string expected = """ + Preparing tests + running... 0 completed, 0 failed, active modules: 0 | no tests completed yet + + """; + Assert.AreEqual(Normalize(expected), Normalize(terminal.Output)); } [TestMethod] @@ -222,6 +348,8 @@ public void OnWrite_DoesNotEraseOrRenderProgress_JustWrites() Assert.IsFalse(terminal.RenderProgressCalled); } + private static string Normalize(string value) => value.Replace("\r\n", "\n"); + private static TestProgressState CreateAssembly(FakeClock clock, int totalTests, int failedTests, string? activeTestName) { var asm = new TestProgressState(1, "MyAcceptance.dll", "net9.0", "x64", clock.CreateStopwatch(), isDiscovery: false); diff --git a/test/UnitTests/Microsoft.Testing.Platform.UnitTests/OutputDevice/Terminal/TerminalTestReporterTests.cs b/test/UnitTests/Microsoft.Testing.Platform.UnitTests/OutputDevice/Terminal/TerminalTestReporterTests.cs index 71c6077d7b..3ff1f9b9e9 100644 --- a/test/UnitTests/Microsoft.Testing.Platform.UnitTests/OutputDevice/Terminal/TerminalTestReporterTests.cs +++ b/test/UnitTests/Microsoft.Testing.Platform.UnitTests/OutputDevice/Terminal/TerminalTestReporterTests.cs @@ -323,11 +323,6 @@ Standard output Error output Oh no! - Out of process file artifacts produced: - - {folder}artifact1.txt - In process file artifacts produced: - - {folder}artifact2.txt - Test run summary: Failed! - {assembly} (net8.0|x64) total: 5 failed: 3 @@ -335,6 +330,11 @@ Oh no! skipped: 1 duration: 3652058d 23h 59m 59s 999ms + Out of process file artifacts produced: + - {folder}artifact1.txt + In process file artifacts produced: + - {folder}artifact2.txt + """; Assert.AreEqual(expected, ShowEscape(output)); @@ -476,11 +476,6 @@ public void SimpleAnsiTerminal_OutputFormattingIsCorrect() ␛[90m Error output ␛[90m Oh no! ␛[m - Out of process file artifacts produced: - - {folder}artifact1.txt - In process file artifacts produced: - - {folder}artifact2.txt - ␛[31mTest run summary: Failed!␛[90m - ␛[m{folder}assembly.dll (net8.0|x64) ␛[m total: 5 ␛[31m failed: 3 @@ -488,6 +483,11 @@ public void SimpleAnsiTerminal_OutputFormattingIsCorrect() ␛[33m skipped: 1 ␛[m duration: 3652058d 23h 59m 59s 999ms + Out of process file artifacts produced: + - {folder}artifact1.txt + In process file artifacts produced: + - {folder}artifact2.txt + """; Assert.AreEqual(expected, ShowEscape(output)); @@ -2743,6 +2743,197 @@ public void TerminalTestReporter_WhenMultipleAssemblies_AggregatesCountsAndOmits Assert.DoesNotContain(secondAssembly, output); } + [TestMethod] + [DataRow(false)] + [DataRow(true)] + public void NonCursorSummary_FailuresPrecedeArtifactsAndSuccessfulRecapsAreNotRepeated(bool simpleAnsi) + { + var console = new StringBuilderConsole(); + using var reporter = new TerminalTestReporter(console, new TerminalTestReporterOptions + { + AnsiMode = simpleAnsi ? AnsiMode.SimpleAnsi : AnsiMode.NoAnsi, + ShowProgress = () => false, + ShowTestResults = TestResultVisibility.None, + ShowAssembly = true, + ShowAssemblyStartAndComplete = true, + }) + { + CreateStopwatch = () => new StubStopwatch(), + }; + reporter.TestExecutionStarted(DateTimeOffset.MinValue, 3, isDiscovery: false, isHelp: false, isRetry: false); + foreach (string module in new[] { "passing", "failing", "crashed" }) + { + reporter.AssemblyRunStarted($"{module}.dll", "net9.0", "x64", module, module); + ReportOrchestratorTest(reporter, $"{module}.dll", module, module, module, module == "failing" ? TestOutcome.Fail : TestOutcome.Passed); + reporter.ArtifactAdded(false, $"{module}.dll", "net9.0", "x64", module, testName: null, $"{module}.trx"); + } + + reporter.AssemblyRunCompleted("passing", 0, outputData: null, errorData: null); + reporter.AssemblyRunCompleted("failing", 2, outputData: null, errorData: null); + reporter.AssemblyRunCompleted("crashed", 42, "crash stdout", "crash stderr"); + reporter.HandshakeFailure("missing.dll", "net9.0", 1, "handshake stdout", "handshake stderr"); + int summaryStart = console.Output.Length; + + reporter.TestExecutionCompleted(DateTimeOffset.MinValue, exitCode: null); + + string output = NormalizeTerminalOutput(console.Output); + TestContext.WriteLine(output); + const string expected = """ + + Test run summary: Failed! + error: 2 + + total: 3 + failed: 1 + succeeded: 2 + skipped: 0 + duration: 0ms + + failing.dll (net9.0|x64) failed with 1 error(s) [+0/x1/?0] (0ms) + crashed.dll (net9.0|x64) failed [+1/x0/?0] (0ms) + + + Handshake failures: + missing.dll (net9.0) + Exit code: 1 + Standard output: handshake stdout + Error output: handshake stderr + + Errored assemblies: + crashed.dll (net9.0|x64) + Exit code: 42 + Standard output: crash stdout + Error output: crash stderr + + In process file artifacts produced: + - passing.trx + - failing.trx + - crashed.trx + + """; + Assert.AreEqual(NormalizeTerminalOutput(expected), NormalizeTerminalOutput(console.Output.Substring(summaryStart))); + Assert.AreEqual(1, output.Split(["passing.dll (net9.0|x64) passed"], StringSplitOptions.None).Length - 1); + } + + [TestMethod] + public void NonCursorSummary_AllPassingModules_KeepOnlyAggregateAfterCompletion() + { + var console = new StringBuilderConsole(); + using var reporter = new TerminalTestReporter(console, new TerminalTestReporterOptions + { + AnsiMode = AnsiMode.SimpleAnsi, + ShowProgress = () => false, + ShowTestResults = TestResultVisibility.None, + ShowAssembly = true, + ShowAssemblyStartAndComplete = true, + }) + { + CreateStopwatch = () => new StubStopwatch(), + }; + reporter.TestExecutionStarted(DateTimeOffset.MinValue, 1, isDiscovery: false, isHelp: false, isRetry: false); + foreach (string module in new[] { "first", "second" }) + { + reporter.AssemblyRunStarted($"{module}.dll", "net9.0", "x64", module, module); + ReportOrchestratorTest(reporter, $"{module}.dll", module, module, module, TestOutcome.Passed); + reporter.AssemblyRunCompleted(module, 0, outputData: null, errorData: null); + } + + int summaryStart = console.Output.Length; + reporter.TestExecutionCompleted(DateTimeOffset.MinValue, 0); + + const string expected = """ + + Test run summary: Passed! + total: 2 + failed: 0 + succeeded: 2 + skipped: 0 + duration: 0ms + + """; + Assert.AreEqual(NormalizeTerminalOutput(expected), NormalizeTerminalOutput(console.Output.Substring(summaryStart))); + } + + [TestMethod] + public void NonCursorSummary_SuppressedVerdict_KeepsFailureRecapsAndArtifacts() + { + var console = new StringBuilderConsole(); + using var reporter = new TerminalTestReporter(console, new TerminalTestReporterOptions + { + AnsiMode = AnsiMode.SimpleAnsi, + ShowProgress = () => false, + ShowAssembly = true, + ShowRunSummary = false, + }); + reporter.TestExecutionStarted(DateTimeOffset.MinValue, 1, isDiscovery: false, isHelp: false, isRetry: true); + reporter.HandshakeFailure("missing.dll", "net9.0", 1, string.Empty, "host error"); + reporter.ArtifactAdded(true, "missing.dll", "net9.0", "x64", "missing", testName: null, "retry.log"); + int summaryStart = console.Output.Length; + reporter.TestExecutionCompleted(DateTimeOffset.MinValue, exitCode: null); + + const string expected = """ + + + Handshake failures: + missing.dll (net9.0) + Exit code: 1 + Error output: host error + + Out of process file artifacts produced: + - retry.log + + """; + Assert.AreEqual(NormalizeTerminalOutput(expected), NormalizeTerminalOutput(console.Output.Substring(summaryStart))); + } + + [TestMethod] + public void NonCursorProgress_CompletedWorkerSlot_IsIncludedInRunTotals() + { + long elapsedTicks = 0; + var stopwatch = new Mock(); + stopwatch.SetupGet(value => value.Elapsed).Returns(() => TimeSpan.FromTicks(Interlocked.Read(ref elapsedTicks))); + var console = new StringBuilderConsole(); + using var rendered = new ManualResetEventSlim(); + using var reporter = new TerminalTestReporter(console, new TerminalTestReporterOptions + { + AnsiMode = AnsiMode.SimpleAnsi, + ShowTestResults = TestResultVisibility.None, + ShowActiveTests = true, + SlowTestThreshold = TimeSpan.Zero, + }) + { + CreateStopwatch = () => stopwatch.Object, + }; + reporter.OnProgressStopUpdate += (_, _) => + { + if (Interlocked.Read(ref elapsedTicks) >= TimeSpan.FromSeconds(60).Ticks) + { + rendered.Set(); + } + }; + reporter.TestExecutionStarted(DateTimeOffset.MinValue, 1, isDiscovery: false, isHelp: false, isRetry: false); + reporter.AssemblyRunStarted("finished.dll", "net9.0", "x64", "finished", "finished"); + ReportOrchestratorTest(reporter, "finished.dll", "finished", "finished", "first", TestOutcome.Passed); + ReportOrchestratorTest(reporter, "finished.dll", "finished", "finished", "second", TestOutcome.Passed); + reporter.AssemblyRunCompleted("finished"); + reporter.AssemblyRunStarted("active.dll", "net9.0", "x64", "active", "active"); + ReportOrchestratorTest(reporter, "active.dll", "active", "active", "third", TestOutcome.Passed); + reporter.TestInProgress("active", "running", "InFlight"); + Interlocked.Exchange(ref elapsedTicks, TimeSpan.FromSeconds(60).Ticks); + + Assert.IsTrue(rendered.Wait(TimeSpan.FromSeconds(30), TestContext.CancellationToken), "The progress refresher did not render."); + reporter.Dispose(); + + const string expected = """ + running... 3 completed, 0 failed, active modules: 1 | last completion: 1m 00s ago | active: InFlight + + """; + Assert.AreEqual(NormalizeTerminalOutput(expected), NormalizeTerminalOutput(console.Output)); + } + + private static string NormalizeTerminalOutput(string output) + => Regex.Replace(output, @"\x1B\[[0-9;]*m", string.Empty).Replace("\r\n", "\n"); + [TestMethod] [DataRow(false)] [DataRow(true)] From c8f95722f0a97434ce92809b63b5ce730859b525 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amaury=20Lev=C3=A9?= Date: Fri, 30 Oct 2026 12:28:59 +0100 Subject: [PATCH 2/6] Record captured reporter output and regression sensitivity evidence Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .../ci-terminal-progress-summaries.md | 117 ++++++++++++++++-- 1 file changed, 110 insertions(+), 7 deletions(-) diff --git a/docs/decisions/ci-terminal-progress-summaries.md b/docs/decisions/ci-terminal-progress-summaries.md index dea0a53d13..07713bec73 100644 --- a/docs/decisions/ci-terminal-progress-summaries.md +++ b/docs/decisions/ci-terminal-progress-summaries.md @@ -71,6 +71,15 @@ retains rollout and servicing responsibility. consumer project fixed the incompatible-reference build without changing package content or target frameworks. Neither setup failure is regression evidence. +- 2026-10-30: The full multi-TFM build/pack succeeded with zero warnings/errors. + All 32 shipping packages identify implementation commit + `f4d8d35bf45ce0ece75a66e1b197c96684767e48`. With the task-local + `VersionSuffix=preview.26530.102`, the SDK's independently generated JUnit + default remains `1.0.0-dev`; a producer-side private-property override did not + change that evaluated value. The SDK validation consumer must use the supported + `MicrosoftTestingExtensionsJUnitReportVersion=1.0.0-preview.26530.102` override + to consume the same-source JUnit package. No package/source fix outside this + reporter change was made. ## Alternatives and decision @@ -108,21 +117,115 @@ focused Debug/net8.0 executions. package is `2.6.0-preview.26530.101`. These are task-local comparison versions, not published package versions. -The same behavioral tests will be retained against baseline production behavior -in the isolated comparison. Packed-host before/after captures and assertion-level -red/green results will be added after execution; they are not yet claimed here. +### Revision-bound regression sensitivity + +The correct implementation is +`f4d8d35bf45ce0ece75a66e1b197c96684767e48`. The isolated comparison retains +both final test files against baseline production, adding only an ignored optional +fourth renderer-constructor parameter so the new aggregation test can compile. +This is a buildable targeted counterfactual, not an unmodified baseline run. +Its retained-test/support patch SHA-256 is +`164ED76C41CAD0FD7B5BEB1A8B3DBAFBFC180836C3A872B39A4BD162CD642352`. + +The identical filter in each state was: + +```text +FullyQualifiedName~VisibleSilence_|FullyQualifiedName~NonCursorSummary_|FullyQualifiedName~NonCursorProgress_ +``` + +Both runners used +`dotnet --filter --report-trx --results-directory --no-ansi --progress off`. +The comparison build used the repository-pinned dotnet with +`build -c Debug -p:TargetFramework=net8.0 -p:TargetFrameworks=net8.0 -bl: -v:minimal`. + +| Contract / test case | Without behavior | Correct implementation | +| --- | --- | --- | +| `VisibleSilence_HiddenCompletions_EmitAtDefaultBoundary` | Assertion: expected one progress line, actual zero. | Passed; 59/60-second boundary and repeat interval. | +| `VisibleSilence_VisibleWriteDelaysHeartbeatButNotCompletionAge`, `VisibleSilence_ProgressMessage_PostponesHeartbeat` | Premature heartbeat/count assertions failed. | Both passed. | +| `VisibleSilence_NoCompletionsAndRestart_DoNotInventProgress` | Exact-output assertion failed. | Passed. | +| `VisibleSilence_CompletedModules_RemainInCumulativeCounts`, `NonCursorProgress_CompletedWorkerSlot_IsIncludedInRunTotals` | Lost completed-module totals; reporter wiring printed one instead of three completed tests. | Both passed. | +| `NonCursorSummary_FailuresPrecedeArtifactsAndSuccessfulRecapsAreNotRepeated` (two modes) | Both exact-output assertions failed. | NoAnsi and SimpleAnsi passed. | +| `NonCursorSummary_AllPassingModules_KeepOnlyAggregateAfterCompletion`, `NonCursorSummary_SuppressedVerdict_KeepsFailureRecapsAndArtifacts` | Both exact-output assertions failed. | Both passed. | + +Red: 10 selected/executed, 10 assertion failures, zero skipped, process exit 2. +Green: the same 10 selected/executed passed, zero skipped, process exit 0. +The source-declared expected names, individual TRX results, test-file hashes, and +green execution gate were checked. Build failures, skips, and zero-test runs were +not counted as sensitivity evidence. The nested comparison emitted duplicate +ancestor `.globalconfig` warnings, but compiled and executed; the real candidate +build had zero warnings. + +### Real packed-host demonstration + +An external net8.0 MSTest host ran eight sequential data rows, each awaiting 750ms, +against each packed core. Both hosts used MSTest framework/adapter +`4.6.0-preview.26529.1` and TrxReport `2.6.0-preview.26529.1`; only the compared core +package changed. This isolates the reporter behavior. The separately frozen +same-source package set below is for native SDK composition. + +The exact arguments were +`--filter FullyQualifiedName~HiddenPass --no-ansi --progress on --show-test-results failed --no-banner --report-trx --results-directory `, +with `MTP_PROGRESS_SILENCE_SECONDS=1` and `MTP_PROGRESS_SLOW_TEST_SECONDS=0`. +The one-second override accelerates the demonstration, not the production default. + +Before: eight executed/passed, exit 0, duration `6s 379ms`, **zero progress lines**. +After: the same eight executed/passed, exit 0, duration `6s 332ms`, and these +captured progress lines: + +```text +running... 1 completed, 0 failed, active modules: 1 | last completion: 0s ago | active: HiddenPass (2) +running... 2 completed, 0 failed, active modules: 1 | last completion: 0s ago | active: HiddenPass (3) +running... 3 completed, 0 failed, active modules: 1 | last completion: 0s ago | active: HiddenPass (4) +running... 5 completed, 0 failed, active modules: 1 | last completion: 0s ago | active: HiddenPass (6) +running... 6 completed, 0 failed, active modules: 1 | last completion: 0s ago | active: HiddenPass (7) +running... 7 completed, 0 failed, active modules: 1 | last completion: 0s ago | active: HiddenPass (8) +``` + +Additional real consumer runs retained eight passing rows and no heartbeat for +`--progress off` and for the zero heartbeat threshold. An intentionally failing +test retained its full diagnostic and exit 2; an empty selection retained exit 8. +Those expected child failures are not counted as green test cases. + +The comparison packages' embedded repository commits, `project.assets.json`, +effective caches, and the DLLs in the launched host directories were verified: + +| Artifact | Before SHA-256 | After SHA-256 | +| --- | --- | --- | +| Net8-only comparison nupkg | `E923C274656C1AF40AE9236F7712D537C88C99FC4C5DEDA07277746BD11483FB` | `FD65003E40C1C20E055388C35205CB0081603759A3EFA25E41F9FFCAECE368F8` | +| Consumed core DLL | `59590E8F40E00587F38916EBE98A3E5B8B9B5F15CC1E9973F7FBD5A759A490D1` | `D0A562846536D9FE8E9456E3785FAF566165F6896720993605F81B07CBC519D5` | + +The authorized PR preserves complete before/after progress transcripts, the +consumer fixture/build commands, and final-summary transcripts captured from +the same reporter harness in both states. Text is preferable to a screenshot +for this CLI output; the harness captures are explicitly not a native SDK run. + +### Aligned package handoff + +The full source build/pack command was +`.\eng\build.ps1 -restore -build -pack -projects 'src\**\*.csproj' -c Debug -bl /p:VersionSuffix=preview.26530.102 /p:SkipRuntimesInstall=true`; +it completed with exit 0, zero warnings/errors, and successful package +content/metadata verification. The pinned runtime needed by focused tests was +already installed. The immutable 32-package feed was handed to the SDK owner +with a SHA-256 manifest, not published to a package registry. + +MSTest packages use `4.6.0-preview.26530.102`, MTP and its version-aligned +extensions use `2.6.0-preview.26530.102`, and JUnit uses +`1.0.0-preview.26530.102` with the explicit consumer property above. Every +package's repository commit is the implementation revision. The full MTP nupkg +hash is `AD327786AD823B6E7424DE97FC308368F14032A6DFF8226F3FF06D07B11B3DBE`; +its net8 core payload exactly matches the captured after-consumer DLL. The owning unit-test assembly uses MSTest method-level parallelism with one worker per processor. New renderer tests use per-test clocks and consoles, not shared environment/console mutation; reporter refresher threads must be joined before assertions or cleanup. Packed consumers use task-owned directories/caches. -Executed evidence and the exact implementation revision will be added after the -comparison runs. Native SDK composed-product evidence is owned by the coordinated -SDK PR and remains separate from TestFx-local proof. +Native SDK composed-product evidence is owned by the coordinated SDK PR and +remains separate from the executed TestFx-local proof. ## Open questions -- Exact package/source pair and native SDK validation results are pending. +- The source/package pair has been delivered. Native SDK validation results are + pending; this PR does not claim that the outer SDK console changed. - Supported release-branch servicing is a coordinator decision after composed validation; no claim of cross-repository completion is made here. From 96db3705ab7ec26801755934dd4e45319e777f8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amaury=20Lev=C3=A9?= Date: Fri, 30 Oct 2026 12:35:18 +0100 Subject: [PATCH 3/6] Clarify main-only CI reporter delivery scope Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- docs/decisions/ci-terminal-progress-summaries.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/docs/decisions/ci-terminal-progress-summaries.md b/docs/decisions/ci-terminal-progress-summaries.md index 07713bec73..ce2700196c 100644 --- a/docs/decisions/ci-terminal-progress-summaries.md +++ b/docs/decisions/ci-terminal-progress-summaries.md @@ -44,9 +44,10 @@ parent/child exit semantics, and multi-module aggregation must not change. Reporter timers are owned by the existing progress terminal, stopped/joined on completion/disposal, and reset for subsequent runs. -Implementation targets `main`. No release-branch backport or downstream feature -enablement is authorized by this change alone; the coordinating CI-output owner -retains rollout and servicing responsibility. +Implementation targets `main` only. This batch excludes backports, downstream +SDK-pin updates, and feature-gate rollout. A future downstream pin or backport is +separate work requiring its own release-branch validation; existing SDK releases +are not fixed by this PR. ## Research and experiments @@ -60,6 +61,9 @@ retains rollout and servicing responsibility. diagnostics; reuse them rather than introducing a second reporting pipeline. - 2026-10-30: The working tree and refreshed `origin/main` both resolve to the baseline above; no open terminal-reporter PR overlaps this work. +- 2026-10-30: The coordinator finalized main-only delivery for this batch. + Backports, downstream SDK-pin updates, and feature-gate rollout are out of + scope rather than pending decisions for this PR. - 2026-10-30: Initial build launches could not find Windows PowerShell because the inherited PATH exceeded `cmd.exe`'s limit. A short process-local PATH containing the pinned dotnet, Windows PowerShell, System32, Git, and the active @@ -227,5 +231,6 @@ remains separate from the executed TestFx-local proof. - The source/package pair has been delivered. Native SDK validation results are pending; this PR does not claim that the outer SDK console changed. -- Supported release-branch servicing is a coordinator decision after composed - validation; no claim of cross-repository completion is made here. +- Backports, downstream SDK-pin updates, and feature-gate rollout are outside + this main-only batch. Future work in those areas needs separate release-branch + validation; no existing SDK release or cross-repository completion is claimed. From 633bf12dd68a97bcb8569a7d92f260fcd5fe2ac8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amaury=20Lev=C3=A9?= Date: Fri, 30 Oct 2026 13:37:48 +0100 Subject: [PATCH 4/6] Link native SDK composed reporter evidence Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .../ci-terminal-progress-summaries.md | 50 +++++++++++++++++-- 1 file changed, 45 insertions(+), 5 deletions(-) diff --git a/docs/decisions/ci-terminal-progress-summaries.md b/docs/decisions/ci-terminal-progress-summaries.md index ce2700196c..e592c38f88 100644 --- a/docs/decisions/ci-terminal-progress-summaries.md +++ b/docs/decisions/ci-terminal-progress-summaries.md @@ -224,13 +224,53 @@ worker per processor. New renderer tests use per-test clocks and consoles, not shared environment/console mutation; reporter refresher threads must be joined before assertions or cleanup. Packed consumers use task-owned directories/caches. -Native SDK composed-product evidence is owned by the coordinated SDK PR and -remains separate from the executed TestFx-local proof. +### Native SDK composed-product evidence + +On 2026-10-30, the SDK owner published the composed validation in +[dotnet/sdk#56851](https://github.com/dotnet/sdk/pull/56851) at +`f5838f51c497a70fb60f3ed7e89102ca293b6838`. The published source states, +commands, captured output, package manifest identity, and results were read back +for this record; these commands were executed by the SDK owner, not rerun by this +TestFx session. + +The comparison uses baseline SDK CLI binaries from +`c781c3cda4cf87f94291d04223e9146664d4f5f5` and final managed/Native AOT binaries +from the SDK revision above in the built Windows x64 redist layout +(`12.0.100-dev`). Both states use the frozen 32-package TestFx feed from +`f4d8d35bf45ce0ece75a66e1b197c96684767e48`, genuine net9.0 MSTest applications, +and .NET 9.0.0. The native invocation explicitly reports +`AOT test tier: TestModules.`. + +In the real native multi-module hidden-pass capture, one module finishes ten +tests while the other continues completing hidden passing tests. The baseline +SDK remains silent; the final SDK emits the following captured line at +`61.7903221` seconds, including the finished module's ten results: + +```text +running... 18 completed, 0 failed, active modules: 1 | last completion: 4s ago +``` + +The final total remains 20. The compact verdict/counts precede artifact paths, +already-printed successful modules are not repeated, and explicit progress +suppression is preserved. The linked SDK evidence records 17 composed cases, +50 passing composed checks, and 246 passing focused SDK tests with no failures +or skips. Its scenarios also cover diagnostic workers, actual map collection, +crash recovery, worker degradation, cancellation, and zero-result exit behavior. + +This closes the previously missing reporter-to-native-SDK evidence for these +main-branch Windows x64 revisions. It does **not** prove required cross-module +Azure DevOps/GitHub summary publication: the SDK PR deliberately does not +advertise handshake field 19 (`RequiredPostProcessingSupported`). Required +singleton processing (field 18) and the authoritative final-policy `runSummary` +handoff remain a separate dependent SDK implementation/validation task. Ordinary +TRX/CTRF/JUnit merging must not be presented as that aggregate proof. ## Open questions -- The source/package pair has been delivered. Native SDK validation results are - pending; this PR does not claim that the outer SDK console changed. +- The reporter's native SDK boundary has composed evidence at the pinned + revisions above. Required cross-module CI-summary aggregation remains outside + that proof and belongs to the separate dependent SDK work. - Backports, downstream SDK-pin updates, and feature-gate rollout are outside this main-only batch. Future work in those areas needs separate release-branch - validation; no existing SDK release or cross-repository completion is claimed. + validation; no existing SDK release or required global CI-summary completion + is claimed. From cc2a04cfb0870039517dbed7c3b862306fb52754 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amaury=20Lev=C3=A9?= Date: Fri, 30 Oct 2026 14:29:26 +0100 Subject: [PATCH 5/6] Address CI reporter review feedback Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- docs/Changelog-Platform.md | 1 + .../OutputDevice/Terminal/IProgressRenderer.cs | 7 +++++-- .../Terminal/SilenceDrivenHeartbeatRenderer.cs | 2 ++ .../OutputDevice/Terminal/TerminalTestReporterTests.cs | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/Changelog-Platform.md b/docs/Changelog-Platform.md index 197f8c8c88..6597e54ecb 100644 --- a/docs/Changelog-Platform.md +++ b/docs/Changelog-Platform.md @@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) * Align the CTRF reporter with specification 0.2.0 by emitting native final-attempt identities, retaining legacy retry identity support, and keeping compatible mixed-version merges correctly versioned and identified. * Graduate `Microsoft.Testing.Extensions.CtrfReport` to stable, align its package version with Microsoft.Testing.Platform, and remove the experimental registration API warning. The producer remains pinned to CTRF 0.2.0 and stays opt-in in MSTest.Sdk. +* Increase the default non-cursor progress heartbeat silence threshold from 30 to 60 seconds and measure it from visible reporter output, so hidden test results no longer postpone heartbeats. `MTP_PROGRESS_SILENCE_SECONDS` still overrides the interval, and `0` disables the heartbeat. ## [2.5.2] - 2026-10-27 diff --git a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/IProgressRenderer.cs b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/IProgressRenderer.cs index 576ee23bcc..7361e7601a 100644 --- a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/IProgressRenderer.cs +++ b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/IProgressRenderer.cs @@ -17,8 +17,11 @@ namespace Microsoft.Testing.Platform.OutputDevice.Terminal; /// run goes silent or a test runs slowly (used for and /// , e.g. CI / piped / redirected output). /// -/// All members are invoked by while it holds the terminal lock, -/// except which may be called from the message pump and MUST be thread-safe. +/// and are invoked by +/// while it holds the terminal lock. runs during initialization, before the rendering +/// thread starts, without that lock. is read by the rendering thread without the +/// lock. may be called from the message pump without the lock and MUST be +/// thread-safe. /// [UnsupportedOSPlatform("browser")] [Embedded] diff --git a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/SilenceDrivenHeartbeatRenderer.cs b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/SilenceDrivenHeartbeatRenderer.cs index 9c96bd930d..4d93536067 100644 --- a/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/SilenceDrivenHeartbeatRenderer.cs +++ b/src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/SilenceDrivenHeartbeatRenderer.cs @@ -36,6 +36,8 @@ internal sealed class SilenceDrivenHeartbeatRenderer : IProgressRenderer private IStopwatch? _clock; + // Initialized in OnStart before the rendering thread starts. OnWrite and OnTick accesses are protected + // by TestProgressStateAwareTerminal's lock; OnTestCompleted does not access this field. private long _lastVisibleOutputTicks; // Completion notifications arrive outside the rendering lock. -1 means no completion in this run. diff --git a/test/UnitTests/Microsoft.Testing.Platform.UnitTests/OutputDevice/Terminal/TerminalTestReporterTests.cs b/test/UnitTests/Microsoft.Testing.Platform.UnitTests/OutputDevice/Terminal/TerminalTestReporterTests.cs index 3ff1f9b9e9..30c520cc41 100644 --- a/test/UnitTests/Microsoft.Testing.Platform.UnitTests/OutputDevice/Terminal/TerminalTestReporterTests.cs +++ b/test/UnitTests/Microsoft.Testing.Platform.UnitTests/OutputDevice/Terminal/TerminalTestReporterTests.cs @@ -2906,7 +2906,7 @@ public void NonCursorProgress_CompletedWorkerSlot_IsIncludedInRunTotals() }; reporter.OnProgressStopUpdate += (_, _) => { - if (Interlocked.Read(ref elapsedTicks) >= TimeSpan.FromSeconds(60).Ticks) + if (console.Output.Length > 0) { rendered.Set(); } From 48278b615aa31246bfa31f9b7a76c54ee3696fed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amaury=20Lev=C3=A9?= Date: Fri, 30 Oct 2026 15:14:13 +0100 Subject: [PATCH 6/6] Link required CI summary SDK composition evidence Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .../ci-terminal-progress-summaries.md | 57 ++++++++++++++++--- 1 file changed, 48 insertions(+), 9 deletions(-) diff --git a/docs/decisions/ci-terminal-progress-summaries.md b/docs/decisions/ci-terminal-progress-summaries.md index e592c38f88..30f4bf6a8a 100644 --- a/docs/decisions/ci-terminal-progress-summaries.md +++ b/docs/decisions/ci-terminal-progress-summaries.md @@ -258,19 +258,58 @@ or skips. Its scenarios also cover diagnostic workers, actual map collection, crash recovery, worker degradation, cancellation, and zero-result exit behavior. This closes the previously missing reporter-to-native-SDK evidence for these -main-branch Windows x64 revisions. It does **not** prove required cross-module +main-targeted Windows x64 revisions. It does **not** prove required cross-module Azure DevOps/GitHub summary publication: the SDK PR deliberately does not -advertise handshake field 19 (`RequiredPostProcessingSupported`). Required -singleton processing (field 18) and the authoritative final-policy `runSummary` -handoff remain a separate dependent SDK implementation/validation task. Ordinary -TRX/CTRF/JUnit merging must not be presented as that aggregate proof. +advertise handshake field 19 (`RequiredPostProcessingSupported`). That distinct +contract now has its own composed evidence in the dependent SDK companion below; +ordinary TRX/CTRF/JUnit merging must not be presented as that aggregate proof. + +### Required CI-summary SDK companion + +On 2026-10-30, [dotnet/sdk#56852](https://github.com/dotnet/sdk/pull/56852) +published required-processing evidence at +`a629f41ab69bdb8f9c2c6ce63d1edf7b5f1aabfe`, stacked on +`c6405adbf0aadab2a0419579f5bffcd72a72764a`. Its frozen before SDK is +`4622ed3b6b3d58465613c5ac0a11243d40f61107`. Both states use the unchanged +32-package feed from `f4d8d35bf45ce0ece75a66e1b197c96684767e48`. + +This session read the published record, checked all 27 final invocation records +against the matrix's source/binary identities and parent exits, and compared the +real before/after singleton and mixed captures. The corresponding application DLL +and resolved-assets hashes match in both states. The SDK owner executed the runs; +they were not rerun here. + +| Real comparison | Before | After | +| --- | --- | --- | +| One module, 10 passing outcomes, parent exit 0 | Per-module Azure summary, no required worker/global attachment. | Actual worker with one manifest input and one global Azure attachment; all 10 outcomes retained. | +| Two modules, 20 reported outcomes: 17 passed, 1 failed, 2 skipped; parent exit 2 | Per-module CI fallback. | One global Azure attachment and one global GitHub section with the authoritative run summary and unchanged outcomes/exit. | + +The final matrix records 27 cases and 470 behavioral checks. The SDK publication +also records separate real older-MTP and connected-worker Ctrl+C cases, plus +343 passing SDK tests. Cases include optional/required dispatch, suppression, +legacy/no-handshake paths, zero/minimum/ignored-exit policies, policy truncation, +missing/partial inputs, worker failures/timeouts, and cancellation. The reviewed +matrix SHA-256 is +`68F80945F39612A08FB6644E59A3ED85D950ED355D0E3AE44A064EC128C0F320`. + +The raw-test versus runner-policy distinction remains explicit: an ignored +failed-test exit can produce authoritative runner exit 0 while failed counts, +test-result indicators/details, and established on-failure summary visibility +remain intact. The separate runner-policy annotation is owned by +[the diagnostic consumer change](https://github.com/microsoft/testfx/pull/12142); +failed tests must not be rewritten as passed. + +This is Windows x64 candidate execution evidence, including local Azure logging +commands and GitHub step-summary files, not proof of remote provider uploads, +cross-OS validation, servicing, or release delivery. The companion remains a +dependent open PR; it is not evidence that either SDK layer is merged or shipped. ## Open questions - The reporter's native SDK boundary has composed evidence at the pinned - revisions above. Required cross-module CI-summary aggregation remains outside - that proof and belongs to the separate dependent SDK work. + revisions above. Required cross-module CI-summary aggregation has separate + evidence at the companion's pinned revision; the two proof boundaries must not + be conflated. - Backports, downstream SDK-pin updates, and feature-gate rollout are outside this main-only batch. Future work in those areas needs separate release-branch - validation; no existing SDK release or required global CI-summary completion - is claimed. + validation; no existing SDK release, merge, or shipped fix is claimed.