Skip to content

Default MTP stdout and stderr to failed tests - #12206

Merged
Amaury Levé (Evangelink) merged 4 commits into
mainfrom
dev/amauryleve/mtp-failed-output-defaults
Nov 5, 2026
Merged

Amaury Levé (Evangelink) merged 4 commits into
mainfrom
dev/amauryleve/mtp-failed-output-defaults

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Pull request

Summary

MTP currently defaults to showing captured output for all visible test results outside AI-agent environments. Make --show-stdout and --show-stderr default to Failed in every environment, as requested by the breaking-change issue.

Explicit all/failed/none overrides, output capture, result visibility, and exit policies are unchanged. CLI help now describes the new default; the owning UpdateXlf target regenerated the localization catalogs.

Fixes #7664

Design and decision record

The existing rationale is #7664; no separate feature design is needed for this default-policy change. Use the existing Failed filtering path in both host initialization and shared reporter options rather than introducing another policy or environment-dependent fallback. Agent detection still controls ANSI/banner behavior.

This is intentionally breaking for non-agent environments. --show-stdout all --show-stderr all restores the previous stream policy. Shared reporter source defaults are aligned, but this PR does not include a downstream dotnet/sdk port or a servicing-branch backport.

Demonstration

Ran the actual packaged ShowOutputOptionTest.exe generated by ShowOutputOptionTests, using MSTest 5.0.0-dev and MTP 3.0.0-dev, with:

ShowOutputOptionTest.exe --output detailed --ansi off --progress off

Observed excerpt below, with the failure stack trace omitted. A text transcript is clearer than an image for this selection change.

failed FailingTest (65ms)
  ...
  Standard output
    stdout from failing test

  Error output
    stderr from failing test

passed PassingTest (0ms)
skipped SkippedTest (2ms)
  Assert.Inconclusive. intentional skip

Inspected the rendered 80-column by 24-row terminal with ANSI off/on and explicit all/none controls. Default output retains the failed test's associated streams without orphan headings on passed/skipped results; names and counts remain intact. Long stack/assembly paths remain available. The intentionally failing fixture exits 2 and reports total 3, failed 1, succeeded 1, skipped 1. No IDE or hosted-service UI claim is made.

Validation and regression proof

Validated on Windows x64 with repository SDK 12.0.100-alpha.1.26509.101, Debug outer hosts (net10.0 unit tests, net12.0 acceptance hosts), and Release generated consumers targeting net11.0, net10.0, and net462.

The tested patch SHA-256 is DCFC19C06675908533CA63D2D9F2F6B7A250077F18DED4E15E4D9121EABCF672. It was committed unchanged as 03d8fac885b2c85dff2699a00299163b4984d18f; parent/baseline is 2e0b731967277449e8a2d2ed73c183296032cdb2.

Selection Executed Passed Failed Skipped Exit
Terminal reporter, output-device, and option-provider unit tests 414 414 0 0 0
ShowOutputOptionTests and MSTest HelpInfoTests 48 48 0 0 0
MTP core/all-extension help and info cases 12 12 0 0 0

All planned acceptance identities were independently discovered and reconciled with fresh TRX execution results. TRX, JUnit XML, and CTRF JSON all parse and contain their matching result counts. Assembly method-level parallelization was preserved; new coverage uses per-test objects or child-process environment overrides.

The full Windows shipping pack passed its package content/metadata validation. The green MTP package SHA-256 is 17EF429DE4E25A1EF613329CC988D000F77B76B20CED68CA13FD19CB73910D08; the separately packed old core is 488A5E03704498EA73C38AD7EBE629435D913DB18D0266704FB70B4776FC64CD. Isolated cache metadata, resolved package payloads, and all three consumers' loaded DLL hashes were checked against the corresponding packages.

Executed validation commands and results

Commands ran from the repository root. Process-local PATH setup was needed for Windows PowerShell. Desktop MSBuild's unrelated ProjectData.Tasks task-host diagnostic was avoided with /p:EnableProjectDataOnBuild=false; the shipping pack retained the complete Windows/UAP layout.

& 'C:\Windows\System32\cmd.exe' /d /c 'set "PATH=C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32;%PATH%" && call build.cmd -pack -projects "src\**\*.csproj" /p:EnableProjectDataOnBuild=false -bl'

Result: exit 0, full shipping pack and package validation passed.

.\.dotnet\dotnet.exe build test\IntegrationTests\MSTest.Acceptance.IntegrationTests\MSTest.Acceptance.IntegrationTests.csproj -c Debug /p:SkipUapTargetFramework=true -bl:artifacts\log\Debug\issue7664-mstest-acceptance-build.binlog -v:minimal
.\.dotnet\dotnet.exe build test\IntegrationTests\Microsoft.Testing.Platform.Acceptance.IntegrationTests\Microsoft.Testing.Platform.Acceptance.IntegrationTests.csproj -c Debug /p:SkipUapTargetFramework=true -bl:artifacts\log\Debug\issue7664-mtp-acceptance-build.binlog -v:minimal

Result: both exit 0, no warnings/errors. The UAP opt-out applies only to building these outer acceptance hosts with dotnet MSBuild, not to the shipping pack.

The following variables resolve the same absolute run-owned result directories used during execution; console-log capture is omitted:

$unitResults = Join-Path (Get-Location).Path 'artifacts\TestResults\Debug\issue7664-unit-green'
$mstestResults = Join-Path (Get-Location).Path 'artifacts\TestResults\Debug\issue7664-mstest-green'
$mtpResults = Join-Path (Get-Location).Path 'artifacts\TestResults\Debug\issue7664-mtp-green'

.\.dotnet\dotnet.exe test --project test\UnitTests\Microsoft.Testing.Platform.UnitTests\Microsoft.Testing.Platform.UnitTests.csproj -c Debug --framework net10.0 --filter 'FullyQualifiedName~TerminalTestReporterTests|FullyQualifiedName~TerminalOutputDeviceTests|FullyQualifiedName~TerminalTestReporterCommandLineOptionsProviderTests' -p:UsingDotNetTest=true "-p:ArtifactsTestResultsDir=$unitResults" -bl:artifacts\log\Debug\issue7664-unit-green.binlog --show-test-results failed

.\.dotnet\dotnet.exe test --project test\IntegrationTests\MSTest.Acceptance.IntegrationTests\MSTest.Acceptance.IntegrationTests.csproj -c Debug --no-build --filter 'FullyQualifiedName~ShowOutputOptionTests|FullyQualifiedName~MSTest.Acceptance.IntegrationTests.HelpInfoTests' -p:UsingDotNetTest=true "-p:ArtifactsTestResultsDir=$mstestResults" -bl:artifacts\log\Debug\issue7664-mstest-green.binlog --show-test-results failed

.\.dotnet\dotnet.exe test --project test\IntegrationTests\Microsoft.Testing.Platform.Acceptance.IntegrationTests\Microsoft.Testing.Platform.Acceptance.IntegrationTests.csproj -c Debug --no-build --filter 'FullyQualifiedName~Help_WhenNoExtensionRegistered_OutputDefaultHelpContent|FullyQualifiedName~Info_WhenNoExtensionRegistered_OutputDefaultInfoContent|FullyQualifiedName~Help_WithAllExtensionsRegistered_OutputFullHelpContent|FullyQualifiedName~Info_WithAllExtensionsRegistered_OutputFullInfoContent' -p:UsingDotNetTest=true "-p:ArtifactsTestResultsDir=$mtpResults" -bl:artifacts\log\Debug\issue7664-mtp-green.binlog --show-test-results failed

Results: exit 0 for each command; respectively 414/414, 48/48, and 12/12 passed, with zero skipped. Acceptance runs used separate marked TESTFX_COLLECTION_NUGET_CACHE directories and Microsoft_Testing_TestInfrastructure_TempDirectory_Cleanup=0 to inspect provenance before owned cleanup.

.\.dotnet\dotnet.exe msbuild src\Platform\Microsoft.Testing.Platform\Microsoft.Testing.Platform.csproj /t:UpdateXlf -bl:artifacts\log\Debug\issue7664-localization.binlog -nologo -v:minimal
python .github\scripts\test_check_localization.py
python .github\scripts\check_localization.py

Results: all exit 0; catalogs regenerated without manual XLF edits, 41 guard tests passed, and 364 catalogs validated.

The isolated comparison used the same unit/MSTest selectors and test source bytes, separate outputs/caches, and the actual baseline core packed with:

build.cmd -msbuildEngine dotnet -pack -projects src\Platform\Microsoft.Testing.Platform\Microsoft.Testing.Platform.csproj -bl

Baseline pack: exit 0. Unit comparison: exit 2, 414 executed, 413 passed/1 intended failure. MSTest acceptance comparison: exit 2, 48 executed, 39 passed/9 intended failures, zero skipped. These are outer assertion failures, not the fixture's expected child exit 2.

Raw TRX, provenance records, CLI transcript, and binlogs are retained locally and have not been uploaded. No remote CI result is claimed, and no downstream SDK/release-branch validation was performed.

Test-value evidence

Contract / exact test Actual old core, tests retained Correct implementation
Default stdout: ShowStdout_Default_ShowsStandardOutputOnlyForFailedTests Executed: all 3 TFM cases fail because passing-test stdout leaks. Executed: all 3 pass; failing stdout remains visible, passing/skipped stdout is absent, exit/counts are preserved.
Default stderr: ShowStderr_Default_ShowsErrorOutputOnlyForFailedTests Executed: all 3 TFM cases fail because passing-test stderr leaks. Executed: all 3 pass with the equivalent stderr contract.
Shared-source options: TerminalTestReporterOptions_Default_ShowsOutputOnlyForFailedTests Executed: expected Failed, actual All. Executed: both option defaults equal Failed.
Help text: Help_WhenMSTestExtensionRegistered_OutputHelpContentOfRegisteredExtension Executed: all 3 TFM cases detect the old default description. Executed: all 3 pass. The 12 MTP core/all-extension help/info cases also pass; that MTP selection was not separately counterfactually executed.

Use Failed as the default in the host and shared terminal reporter regardless
of agent detection. Preserve explicit overrides, update CLI help and generated
localization catalogs, and cover passing, failing, and skipped output.

Fixes #7664

Co-authored-by: Copilot App <[email protected]>
Copilot AI balanced review requested due to automatic review settings November 4, 2026 13:56
@github-actions github-actions Bot added the state/needs-review Awaiting review from the team. label Nov 4, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

🤖 Automated review by GitHub Copilot. Generated by the Expert Code Review workflow. To request a follow-up action, reply by tagging @copilot directly.

Scope: I reviewed the diff only, without building or running tests. It makes --show-stdout / --show-stderr default to Failed for all environments, removes the LLM-specific default, updates the resx help text, the .xlf translations (marked needs-review-translation), the help/info acceptance expectations, and the tests.

Finding (inline): this is a default behavior change for all users: passing-test output is no longer shown unless all is requested. Please confirm it is intended and add a changelog or breaking-change note.

Checked, no issues found:

  • Help text matches the new default in the resx, the HelpInfo expectations and the xlf sources.
  • The .xlf changes are consistent with the resx edit. Regenerate them with UpdateXlf if they were hand-edited.
  • The existing LLM-default tests still pass logically, since Failed is now the default everywhere.
  • isLLMEnvironment is still used for ANSI mode, so there is no dead variable.
  • The TODO(#8772) was removed along with the code it referred to.
  • The new skipped-test acceptance coverage is deterministic.
  • Existing reporter tests now set All explicitly, so their expectations are preserved.

Test-value evidence: the changed default is covered by TerminalTestReporterOptions_Default_ShowsOutputOnlyForFailedTests and the acceptance tests ShowStdout_Default_ShowsStandardOutputOnlyForFailedTests and ShowStderr_Default_ShowsErrorOutputOnlyForFailedTests. I did not execute them, so this is a static assessment only. These tests should fail against the old defaults.

@microsoft-github-policy-service microsoft-github-policy-service Bot added state/needs-review Awaiting review from the team. and removed state/needs-review Awaiting review from the team. labels Nov 4, 2026
@github-actions github-actions Bot added state/needs-review Awaiting review from the team. and removed state/needs-review Awaiting review from the team. labels Nov 4, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧪 Test quality review — PR #12206

Compared merge base 2e0b731967277449e8a2d2ed73c183296032cdb2 with head 03d8fac885b2c85dff2699a00299163b4984d18f. Evidence applies to this head, not every intermediate commit.

Test-value evidence

Static predictions only; this workflow ran no code. The PR description claims executed red/green runs against the baseline (not independently verified here, and no accessible TRX records were checked).

Contract Test Static prediction
Default --show-stdout is Failed ShowStdout_Default_ShowsStandardOutputOnlyForFailedTests Likely killed. With the old default All, AssertOutputDoesNotContain("stdout from passing test") fails.
Default --show-stderr is Failed ShowStderr_Default_ShowsErrorOutputOnlyForFailedTests Likely killed, same reasoning.
TerminalTestReporterOptions defaults TerminalTestReporterOptions_Default_ShowsOutputOnlyForFailedTests Likely killed. Exact equality on both properties.
Help text default wording HelpInfoTests and HelpInfoAllExtensionsTests (wildcard text) Likely killed. The old text differs.
Explicit all, failed and none, plus LLM-environment overrides Existing ShowOutputOptionTests plus the new skipped-test assertions Unchanged behavior; the new assertions extend coverage to skipped results.
Comment-only edit in LLMEnvironmentDetector.cs n/a Not applicable (non-executable).
.resx and .xlf text n/a Covered by the help tests.

Existing unit tests that depend on the old All default were pinned explicitly to OutputShowMode.All, which preserves their behavior.

🧵 Parallel safety

STATUS: CLEAN. No findings. The new SkippedTest lives in the existing generated asset, which runs in a child process. The new unit test is purely in-memory. Analyzer coverage was read-only, and worker configuration was not determined.

Assembly Scope Workers
MSTest.Acceptance.IntegrationTests HelpInfoTests, ShowOutputOptionTests not determined
Microsoft.Testing.Platform.Acceptance.IntegrationTests HelpInfoTests, HelpInfoAllExtensionsTests not determined
Microsoft.Testing.Platform.UnitTests TerminalTestReporterTests not determined

Per-test assessment

I found no verified defects, so there are no inline comments. Grades and per-test rows were not produced by running the grade-tests skill. Modified tests were reviewed manually. Pseudo-mutation evidence is static prediction only.

<table>
<thead>
<tr><th>Result</th><th>Quality</th><th>Test</th><th>Notes</th><th>How to improve</th></tr>
</thead>
<tbody>
<tr>
<td>Pass</td>
<td>A (90–100)</td>
<td>new <code>TerminalTestReporterTests.<br>TerminalTestReporterOptions_<br>Default_<br>ShowsOutputOnlyForFailedTests</code></td>
<td>Exact equality on both defaults protects the contract.</td>
<td>None</td>
</tr>
<tr>
<td>Pass</td>
<td>B (80–89)</td>
<td>mod <code>ShowOutputOptionTests.<br>ShowStdout_<br>Default_<br>ShowsStandardOutputOnlyForFailedTests</code></td>
<td>Checks exit code, per-test stdout presence and absence, and counts.</td>
<td>None</td>
</tr>
<tr>
<td>Pass</td>
<td>B (80–89)</td>
<td>mod <code>ShowOutputOptionTests.<br>ShowStderr_<br>Default_<br>ShowsErrorOutputOnlyForFailedTests</code></td>
<td>Same contract for stderr.</td>
<td>None</td>
</tr>
<tr>
<td>Pass</td>
<td>B (80–89)</td>
<td>mod <code>ShowOutputOptionTests.<br>ShowStdout_/ShowStderr_<br>None/Failed/All/LLM variants</code></td>
<td>Skipped-test assertions added consistently per mode.</td>
<td>None</td>
</tr>
<tr>
<td>Pass</td>
<td>B (80–89)</td>
<td>mod <code>HelpInfoTests</code> and <code>HelpInfoAllExtensionsTests</code> (MSTest and MTP)</td>
<td>Wildcard help/info text updated to match the new default wording.</td>
<td>None</td>
</tr>
<tr>
<td>Pass</td>
<td>B (80–89)</td>
<td>mod <code>TerminalTestReporterTests.<br>NonAnsi/SimpleAnsi/Ansi_<br>OutputFormattingIsCorrect<br>and AnsiTerminal_<br>OutputProgressFrameIsCorrect</code></td>
<td>Pinned to <code>All</code>, so the exact-output expectations are preserved.</td>
<td>None</td>
</tr>
</tbody>
</table>

<sub>This advisory review is heuristic and non-blocking.

Re-run the combined review with /review-tests, or only the parallel-safety specialist with /parallel-audit.</sub>

🤖 Automated content by GitHub Copilot. Generated by the Test Quality Review on PR (on open / sync) workflow. · copilot · auto · ~52 AIC · ⌖ ~1 AIC · ⊞ 8K

@microsoft-github-policy-service microsoft-github-policy-service Bot added state/needs-review Awaiting review from the team. and removed state/needs-review Awaiting review from the team. labels Nov 4, 2026
@github-actions github-actions Bot added state/needs-review Awaiting review from the team. and removed state/needs-review Awaiting review from the team. labels Nov 4, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified for the change to failed-test-only output defaults.

No open issues 🎉

What changed in this PR

Implements #7664 by making Microsoft.Testing.Platform show captured stdout and stderr only for failed tests by default, regardless of environment. Explicit all, failed, and none overrides remain unchanged.

Changes:

  • Aligns host initialization and shared terminal-reporter defaults on Failed.
  • Updates CLI help, help expectations, and localization catalog sources.
  • Extends regression coverage to skipped-test output and preserves explicit all-output formatting tests.

Test-value evidence: The PR reports passing validation and baseline assertion failures for revision 03d8fac885b2c85dff2699a00299163b4984d18f. Raw execution artifacts remain local, so those results were not independently verified here.

File Description
test/​UnitTests/​Microsoft.Testing.Platform.UnitTests/​OutputDevice/​Terminal/​TerminalTestReporterTests.cs Tests new defaults; explicitly enables streams in formatting tests.
test/​IntegrationTests/​MSTest.Acceptance.IntegrationTests/​ShowOutputOptionTests.cs Checks failed-only defaults, skipped streams, counts, and exit codes.
test/​IntegrationTests/​MSTest.Acceptance.IntegrationTests/​HelpInfoTests.cs Updates MSTest help expectations.
test/​IntegrationTests/​Microsoft.Testing.Platform.Acceptance.IntegrationTests/​HelpInfoTests.cs Updates core MTP help and info expectations.
test/​IntegrationTests/​Microsoft.Testing.Platform.Acceptance.IntegrationTests/​HelpInfoAllExtensionsTests.cs Updates all-extension help and info expectations.
src/​Platform/​Microsoft.Testing.Platform/​OutputDevice/​TerminalOutputDevice.Initialization.cs Defaults both streams to Failed without environment detection.
src/​Platform/​Microsoft.Testing.Platform/​OutputDevice/​Terminal/​xlf/​TerminalResources.zh-Hant.xlf Refreshes sources; flags Traditional Chinese translations for review.
src/​Platform/​Microsoft.Testing.Platform/​OutputDevice/​Terminal/​xlf/​TerminalResources.zh-Hans.xlf Refreshes sources; flags Simplified Chinese translations for review.
src/​Platform/​Microsoft.Testing.Platform/​OutputDevice/​Terminal/​xlf/​TerminalResources.tr.xlf Refreshes sources; flags Turkish translations for review.
src/​Platform/​Microsoft.Testing.Platform/​OutputDevice/​Terminal/​xlf/​TerminalResources.ru.xlf Refreshes sources; flags Russian translations for review.
src/​Platform/​Microsoft.Testing.Platform/​OutputDevice/​Terminal/​xlf/​TerminalResources.pt-BR.xlf Refreshes sources; flags Brazilian Portuguese translations for review.
src/​Platform/​Microsoft.Testing.Platform/​OutputDevice/​Terminal/​xlf/​TerminalResources.pl.xlf Refreshes sources; flags Polish translations for review.
src/​Platform/​Microsoft.Testing.Platform/​OutputDevice/​Terminal/​xlf/​TerminalResources.ko.xlf Refreshes sources; flags Korean translations for review.
src/​Platform/​Microsoft.Testing.Platform/​OutputDevice/​Terminal/​xlf/​TerminalResources.ja.xlf Refreshes sources; flags Japanese translations for review.
src/​Platform/​Microsoft.Testing.Platform/​OutputDevice/​Terminal/​xlf/​TerminalResources.it.xlf Refreshes sources; flags Italian translations for review.
src/​Platform/​Microsoft.Testing.Platform/​OutputDevice/​Terminal/​xlf/​TerminalResources.fr.xlf Refreshes sources; flags French translations for review.
src/​Platform/​Microsoft.Testing.Platform/​OutputDevice/​Terminal/​xlf/​TerminalResources.es.xlf Refreshes sources; flags Spanish translations for review.
src/​Platform/​Microsoft.Testing.Platform/​OutputDevice/​Terminal/​xlf/​TerminalResources.de.xlf Refreshes sources; flags German translations for review.
src/​Platform/​Microsoft.Testing.Platform/​OutputDevice/​Terminal/​xlf/​TerminalResources.cs.xlf Refreshes sources; flags Czech translations for review.
src/​Platform/​Microsoft.Testing.Platform/​OutputDevice/​Terminal/​TerminalTestReporterOptions.cs Sets shared reporter stream defaults to Failed.
src/​Platform/​Microsoft.Testing.Platform/​OutputDevice/​Terminal/​TerminalResources.resx Documents the new default in both option descriptions.
src/​Platform/​Microsoft.Testing.Platform/​Helpers/​LLMEnvironmentDetector.cs Removes stream defaults from the explanatory comment only.

Review effort: Balanced

Add the MTP 3.0 breaking-change note and explicit all/all migration flags for the intentional default change in #7664.

Co-authored-by: Copilot App <[email protected]>
Copilot AI balanced review requested due to automatic review settings November 4, 2026 14:10
@github-actions github-actions Bot added state/needs-review Awaiting review from the team. and removed state/needs-review Awaiting review from the team. labels Nov 4, 2026
@microsoft-github-policy-service microsoft-github-policy-service Bot added state/needs-review Awaiting review from the team. and removed state/needs-review Awaiting review from the team. labels Nov 4, 2026
@github-actions github-actions Bot added state/needs-review Awaiting review from the team. and removed state/needs-review Awaiting review from the team. labels Nov 4, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧪 Test quality review — PR #12206

Compared merge base 2e0b731967277449e8a2d2ed73c183296032cdb2 with head 6d5d2981f8641837a27c2229c78754eaf59b44d0. Evidence applies to this head, not every intermediate commit.

Test-value evidence

Static predictions only; this workflow ran no code. The PR description claims executed red/green runs, but I checked no accessible TRX records, so those results are unverified here.

Contract Test Static prediction
Default --show-stdout is Failed ShowStdout_Default_ShowsStandardOutputOnlyForFailedTests Likely killed. With the old default All, AssertOutputDoesNotContain("stdout from passing test") fails.
Default --show-stderr is Failed ShowStderr_Default_ShowsErrorOutputOnlyForFailedTests Likely killed, same reasoning.
TerminalTestReporterOptions defaults TerminalTestReporterOptions_Default_ShowsOutputOnlyForFailedTests Likely killed. Exact equality on both properties.
Help text default wording HelpInfoTests and HelpInfoAllExtensionsTests (wildcard text) Likely killed. The old text differs.
Explicit all/failed/none and LLM-environment overrides Existing ShowOutputOptionTests plus the new skipped-test assertions Behavior unchanged. The new assertions extend coverage to skipped results.
Comment-only edit in LLMEnvironmentDetector.cs, changelog n/a Not applicable (non-executable).
.resx and .xlf text n/a Covered by the help tests.

Existing reporter formatting tests were pinned to OutputShowMode.All, which preserves their exact-output expectations.

🧵 Parallel safety

STATUS: PARTIAL. The separate specialist task was not run in this session, so coverage is incomplete and not an all-clear. A manual look found no shared mutable state. The new SkippedTest lives in the existing generated asset, which runs in a child process. The new unit test creates a per-test options object. Workers and parallelization configuration were not determined.

Per-test assessment

No verified defects, so there are no inline comments. The grade-tests skill was not run. These grades are a manual review, and the pseudo-mutation evidence above is static prediction only.

<table>
<thead>
<tr><th>Result</th><th>Quality</th><th>Test</th><th>Notes</th><th>How to improve</th></tr>
</thead>
<tbody>
<tr>
<td>Pass</td>
<td>A (90–100)</td>
<td>new <code>TerminalTestReporterTests.<br>TerminalTestReporterOptions_<br>Default_<br>ShowsOutputOnlyForFailedTests</code></td>
<td>Exact equality on both defaults protects the contract.</td>
<td>None</td>
</tr>
<tr>
<td>Pass</td>
<td>B (80–89)</td>
<td>mod <code>ShowOutputOptionTests.<br>ShowStdout_<br>Default_<br>ShowsStandardOutputOnlyForFailedTests</code></td>
<td>Checks exit code, per-test stdout presence/absence, and counts.</td>
<td>None</td>
</tr>
<tr>
<td>Pass</td>
<td>B (80–89)</td>
<td>mod <code>ShowOutputOptionTests.<br>ShowStderr_<br>Default_<br>ShowsErrorOutputOnlyForFailedTests</code></td>
<td>Same contract for stderr.</td>
<td>None</td>
</tr>
<tr>
<td>Pass</td>
<td>B (80–89)</td>
<td>mod <code>ShowOutputOptionTests.<br>ShowStdout_/ShowStderr_<br>None/Failed/All/LLM variants</code></td>
<td>Skipped-test assertions added consistently per mode.</td>
<td>None</td>
</tr>
<tr>
<td>Pass</td>
<td>B (80–89)</td>
<td>mod <code>HelpInfoTests</code> and <code>HelpInfoAllExtensionsTests</code> (MSTest and MTP)</td>
<td>Wildcard help/info text matches the new default wording.</td>
<td>None</td>
</tr>
<tr>
<td>Pass</td>
<td>B (80–89)</td>
<td>mod <code>TerminalTestReporterTests.<br>NonAnsi/SimpleAnsi/Ansi_<br>OutputFormattingIsCorrect</code> and <code>AnsiTerminal_<br>OutputProgressFrameIsCorrect</code></td>
<td>Pinned to <code>All</code>, so exact-output expectations are preserved.</td>
<td>None</td>
</tr>
</tbody>
</table>

<sub>This advisory review is heuristic and non-blocking.

Re-run the combined review with /review-tests, or only the parallel-safety specialist with /parallel-audit.</sub>

🤖 Automated content by GitHub Copilot. Generated by the Test Quality Review on PR (on open / sync) workflow. · copilot · auto · ~34 AIC · ⌖ ~1 AIC · ⊞ 8K

@microsoft-github-policy-service microsoft-github-policy-service Bot added state/needs-review Awaiting review from the team. and removed state/needs-review Awaiting review from the team. labels Nov 4, 2026
@github-actions github-actions Bot added state/needs-review Awaiting review from the team. and removed state/needs-review Awaiting review from the team. labels Nov 4, 2026
@microsoft-github-policy-service microsoft-github-policy-service Bot added the state/needs-review Awaiting review from the team. label Nov 4, 2026
@github-actions github-actions Bot added state/approved Proposal approved; ready for implementation. and removed state/needs-review Awaiting review from the team. state/approved Proposal approved; ready for implementation. labels Nov 4, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧪 Test quality review — PR #12206

Compared merge base 2e0b731967277449e8a2d2ed73c183296032cdb2 with head 2219cb4b3a2d178363ac150e8b7014ec75637d4d. Evidence applies to this head, not every intermediate commit.

Test-value evidence

All results are static predictions. No tests were executed, so there is no paired red/green proof.

Contract Scenario and expected outcome Test and decisive assertion Counterfactual Status
--show-stdout and --show-stderr default to Failed in every environment No option is passed, so stdout and stderr appear only for the failed test ShowStdout_Default_ShowsStandardOutputOnlyForFailedTests and ShowStderr_Default_ShowsErrorOutputOnlyForFailedTests assert that passing and skipped output is absent. The test-asset method SkippedTest was added for this. Restoring the All default makes AssertOutputDoesNotContain("stdout from passing test") fail. Static prediction: would fail without the change.
TerminalTestReporterOptions defaults A new TerminalTestReporterOptions() has ShowStdout and ShowStderr equal to Failed TerminalTestReporterOptions_Default_ShowsOutputOnlyForFailedTests uses Assert.AreEqual on both properties. Restoring the All defaults fails both assertions. Static prediction: would fail without the change.
Terminal-reporter formatting tests Output formatting is unchanged once ShowStdout/ShowStderr are set to All explicitly Four existing formatting tests in TerminalTestReporterTests. Not applicable: pre-existing expectations preserved. Refactor-style; expected to pass before and after.
LLM-environment default no longer special-cased An LLM environment still defaults to Failed ShowStdout_DefaultInLLMEnvironment_ShowsStandardOutputOnlyForFailedTests and ShowStderr_DefaultInLLMEnvironment_ShowsErrorOutputOnlyForFailedTests, now also asserting skipped output is absent. Covered by the default tests above. Static prediction: passes before and after.
Explicit --show-stdout all Stdout from passing and skipped tests is shown ShowStdout_All_*, ShowStderr_All_*, and the *_InLLMEnvironment_Still* variants assert passing and skipped output is present. Not applicable: explicit option behavior is unchanged. Static prediction: passes before and after.
Help text The help text says Default is 'Failed'. The HelpInfoTests and HelpInfoAllExtensionsTests wildcard expectations. Restoring the old resource text fails the match. Static prediction: would fail without the change.
Docs, changelog, xlf, comment edits None None Not applicable: non-behavioral. Not applicable.

Two existing acceptance tests, LegacyLifecycleObjectModelTests and TestDependencyExecutionTests, now pass --show-stdout all. This keeps them observing passing-test output after the default change. I found no unprotected contract.

🧵 Parallel safety

STATUS: PARTIAL. The parallel-safety specialist was not run in this session, so coverage is incomplete and this is not a clean result.

The only structural test change I saw is a third test method added to the generated asset in ShowOutputOptionTests. The changed tests are acceptance tests that launch separate test-host processes against a shared prebuilt asset, as before. I found no new shared mutable state. No .runsettings or testconfig.json change was visible beyond the candidate file list.

Per-test assessment

Pseudo-mutation evidence below consists of static predictions, not executed mutation results. Reverting the default to All is a likely-killed mutant (inferred) for the default and options tests.

<table>
<thead>
<tr><th>Result</th><th>Quality</th><th>Test</th><th>Notes</th><th>How to improve</th></tr>
</thead>
<tbody>
<tr><td>Pass</td><td>A (90–100)</td><td>mod <code>ShowOutputOptionTests.<br>ShowStdout_<br>Default_<br>ShowsStandardOutputOnlyForFailedTests</code></td><td>Asserts exit code, per-outcome output presence/absence and summary counts.</td><td>None</td></tr>
<tr><td>Pass</td><td>A (90–100)</td><td>mod <code>ShowOutputOptionTests.<br>ShowStderr_<br>Default_<br>ShowsErrorOutputOnlyForFailedTests</code></td><td>Same contract, asserted for stderr.</td><td>None</td></tr>
<tr><td>Pass</td><td>A (90–100)</td><td>new <code>TerminalTestReporterTests.<br>TerminalTestReporterOptions_<br>Default_<br>ShowsOutputOnlyForFailedTests</code></td><td>Exact enum assertions on both default properties.</td><td>None</td></tr>
<tr><td>Pass</td><td>B (80–89)</td><td>mod <code>ShowOutputOptionTests.<br>ShowStdout_ and ShowStderr_<br>None/Failed/All and LLM variants (12 tests)</code></td><td>Skipped-output assertions were added; the pre-existing weaker substring checks remain.</td><td>None</td></tr>
<tr><td>Pass</td><td>B (80–89)</td><td>mod <code>TerminalTestReporterTests.<br>NonAnsi / SimpleAnsi / Ansi formatting and progress-frame tests (4 tests)</code></td><td>Explicit <code>All</code> options preserve the original snapshot expectations.</td><td>None</td></tr>
<tr><td>Pass</td><td>B (80–89)</td><td>mod <code>HelpInfoTests / HelpInfoAllExtensionsTests</code> (MTP and MSTest)</td><td>Wildcard expectations match the new description text.</td><td>None</td></tr>
<tr><td>Pass</td><td>B (80–89)</td><td>mod <code>LegacyLifecycleObjectModelTests,<br>TestDependencyExecutionTests</code></td><td>The explicit <code>--show-stdout all</code> argument keeps the original assertions valid.</td><td>None</td></tr>
</tbody>
</table>

No inline findings. The PR's existing-thread check was not performed, and no inline comments were published.

<sub>This advisory review is heuristic and non-blocking.

Re-run the combined review with /review-tests, or only the parallel-safety specialist with /parallel-audit.</sub>

🤖 Automated content by GitHub Copilot. Generated by the Test Quality Review on PR (on open / sync) workflow. · copilot · auto · ~33 AIC · ⌖ ~1 AIC · ⊞ 8K

@microsoft-github-policy-service microsoft-github-policy-service Bot added the state/needs-review Awaiting review from the team. label Nov 4, 2026
@github-actions github-actions Bot added state/approved Proposal approved; ready for implementation. and removed state/needs-review Awaiting review from the team. state/approved Proposal approved; ready for implementation. labels Nov 4, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues block the change to failed-test-only output defaults.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@microsoft-github-policy-service microsoft-github-policy-service Bot added the state/needs-review Awaiting review from the team. label Nov 4, 2026
@github-actions github-actions Bot added state/approved Proposal approved; ready for implementation. and removed state/needs-review Awaiting review from the team. state/approved Proposal approved; ready for implementation. labels Nov 4, 2026
@github-actions

This comment has been minimized.

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Final test-triage resolution — Azure Pipelines build 1664073

Result: inconclusive. The collector marked its evidence incomplete (evidenceIncomplete=true, 1 artifact download failure), so this does not clear any leg. No issue was created.

Failing legs are "Windows Debug / Test (unit tests only)" and the Linux acceptance legs. I saw three distinct signatures:

  1. GlobalConfigGeneratorContinuationTests (net472, MSTest.Analyzers.UnitTests). Many tests fail with Assertion failed. Expected condition to be true. and CS1705: Microsoft.CodeAnalysis 4.14 uses System.Runtime 9.0.0.0, but the referenced assembly is 8.0.0.0. This looks like a deterministic reference or binding-version mismatch in the net472 test compilation, not a flake. Confidence: medium. Next step: check whether the PR changed analyzer test references or System.Runtime handling.
  2. InheritedMemberFromDifferentMSTestVersionAnalyzerTests (net11.0, Visual Basic cases). These fail with BC31519: 'Microsoft.VisualStudio.TestPlatform.TestFramework' cannot be referenced because it is not a valid assembly. PE image doesn't contain managed metadata. A reference assembly used by the VB test is likely corrupt or empty. Confidence: low to medium. Next step: inspect that reference file in the failing build's artifacts.
  3. GitHubActionsAttachmentTests (net12.0, Linux acceptance). The tests run the generated GitHubActionsAttachmentBehavior host built for net8.0, which exits with code 150 and You must install or update .NET to run this application. The net8.0 runtime appears to be missing on the agent, so this is most likely an environment or setup problem rather than a product defect. Confidence: medium. Next step: confirm the net8.0 runtime is installed for acceptance runs, or whether these tests are new in this PR.

I could not establish prior occurrences or retry (fail-then-pass) behavior, so none of these are labeled flaky or recurring. No crash or hang diagnostics were collected. Ordinary compile or build failures are left to Build Failure Analysis.

Please re-run the failing legs after addressing signature 1. If signatures 2 and 3 persist on an unrelated commit, they warrant an issue.

🤖 Automated content by GitHub Copilot. Generated by the Pipeline Test Triage workflow. · copilot · auto · ~28 AIC · ⌖ ~1 AIC · ⊞ 10K

Copilot AI balanced review requested due to automatic review settings November 5, 2026 08:45
@github-actions github-actions Bot added state/approved Proposal approved; ready for implementation. and removed state/approved Proposal approved; ready for implementation. labels Nov 5, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧪 Test quality review — PR #12206

Compared merge base 92e83edafb54811009aae479caf29a763f19a99a with head d29cb4c6c075c8153f3292d2d6b4bcbc91867633. Evidence applies to this head, not every intermediate commit. Analysis was static; no tests were executed.

Test-value evidence

Contract: --show-stdout/--show-stderr now default to Failed regardless of LLM environment (previously All, or Failed under an LLM agent).

  • Default behavior (option class + option parsing). Expected: passing and skipped tests' output is hidden by default. Tests: TerminalTestReporterOptions_Default_ShowsOutputOnlyForFailedTests (asserts Failed for both) and the acceptance ShowStdout_Default_ShowsStandardOutputOnlyForFailedTests / ShowStderr_Default_... (assert the passing and skipped output is absent). Counterfactual: restoring OutputShowMode.All fails these. The old GetShowOutputMode fallback would also fail the acceptance tests. Static prediction, not executed.
  • Explicit All unaffected. ShowStdout_All_*, ShowStderr_All_* and the LLM variants now include the skipped-test output. Static prediction: they pass before and after.
  • Existing tests that depend on the old default. Four TerminalTestReporterTests snapshot tests, TestDependencyExecutionTests and LegacyLifecycleObjectModelTests now pass All explicitly. This keeps their expected output stable. These are refactor-style expectations: pass before and after.
  • Help text. The HelpInfoTests and HelpInfoAllExtensionsTests expectations match the updated .resx text, which the .xlf files mirror. Static prediction.
  • Not applicable: comment edit in LLMEnvironmentDetector.cs and docs/Changelog-Platform.md.
  • No executed red/green records were available. CI status is not treated as proof.

🧵 Parallel safety

Status: CLEAN. No shared-state, shared-path, or resource-lock hazards were found. Changes touch asset source, command-line arguments, expectation strings, and a local options object. Evidence gap: the specialist did not read TerminalTestReporterTests outside the changed ranges.

Assembly Scope Findings
MSTest.Acceptance.IntegrationTests Assembly-level method parallelization, unchanged 0
Microsoft.Testing.Platform.Acceptance.IntegrationTests Help-text expectations only 0
Microsoft.Testing.Platform.UnitTests Options edits plus one new test 0

Per-test assessment

Pseudo-mutation evidence is static prediction only: the old All default is likely killed (inferred) by the new default tests.

<table>
<thead>
<tr><th>Result</th><th>Quality</th><th>Test</th><th>Notes</th><th>How to improve</th></tr>
</thead>
<tbody>
<tr>
<td>Pass</td>
<td>A (90–100)</td>
<td>new <code>TerminalTestReporterTests.<br>TerminalTestReporterOptions_<br>Default_<br>ShowsOutputOnlyForFailedTests</code></td>
<td>Exact-value assertions on both default properties.</td>
<td>None</td>
</tr>
<tr>
<td>Pass</td>
<td>A (90–100)</td>
<td>mod <code>ShowOutputOptionTests.<br>ShowStdout_Default_<br>ShowsStandardOutputOnlyForFailedTests</code></td>
<td>Checks exit code, output presence and absence, and result counts.</td>
<td>None</td>
</tr>
<tr>
<td>Pass</td>
<td>A (90–100)</td>
<td>mod <code>ShowOutputOptionTests.<br>ShowStderr_Default_<br>ShowsErrorOutputOnlyForFailedTests</code></td>
<td>Same coverage as the stdout counterpart.</td>
<td>None</td>
</tr>
<tr>
<td>Pass</td>
<td>B (80–89)</td>
<td>mod <code>ShowOutputOptionTests.<br>ShowStdout_/ShowStderr_ None, Failed, All and LLM variants (12)</code></td>
<td>Skipped-test assertions added; the stdout/stderr variants share the same structure.</td>
<td>None</td>
</tr>
<tr>
<td>Pass</td>
<td>B (80–89)</td>
<td>mod <code>TerminalTestReporterTests.<br>NonAnsi/SimpleAnsi/Ansi_<br>OutputFormattingIsCorrect and ProgressFrame</code></td>
<td>Explicit All keeps the snapshot expectations independent of the default.</td>
<td>None</td>
</tr>
<tr>
<td>Pass</td>
<td>B (80–89)</td>
<td>mod <code>TestDependencyExecutionTests.<br>DependsOn_RunsPrerequisitesFirst...</code>; <code>LegacyLifecycleObjectModelTests.<br>LifecycleInheritanceModes_<br>RunInTargetFrameworkHost</code></td>
<td>Explicit --show-stdout all preserves the output these tests parse.</td>
<td>None</td>
</tr>
<tr>
<td>Pass</td>
<td>B (80–89)</td>
<td>mod <code>HelpInfoTests / HelpInfoAllExtensionsTests (MSTest, MTP)</code></td>
<td>Wildcard expectations match the new help text.</td>
<td>None</td>
</tr>
</tbody>
</table>

No inline findings met the publication gate. Existing-review lookup found no prior report for this head.

<sub>This advisory review is heuristic and non-blocking.

Re-run the combined review with /review-tests, or only the parallel-safety specialist with /parallel-audit.</sub>

🤖 Automated content by GitHub Copilot. Generated by the Test Quality Review on PR (on open / sync) workflow. · copilot · auto · ~55 AIC · ⌖ ~1 AIC · ⊞ 8K

@microsoft-github-policy-service microsoft-github-policy-service Bot added the state/needs-review Awaiting review from the team. label Nov 5, 2026
@github-actions github-actions Bot added state/approved Proposal approved; ready for implementation. and removed state/needs-review Awaiting review from the team. state/approved Proposal approved; ready for implementation. labels Nov 5, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues require changes to the failed-test-only output defaults.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@Evangelink
Amaury Levé (Evangelink) merged commit 88cf396 into main Nov 5, 2026
29 checks passed
@Evangelink
Amaury Levé (Evangelink) deleted the dev/amauryleve/mtp-failed-output-defaults branch November 5, 2026 10:15
@github-actions github-actions Bot removed the state/approved Proposal approved; ready for implementation. label Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[MTP][Breaking] Change the default of --show-stdout and --show-stderr to failed.

3 participants