Backport MTP handshake failure diagnostics#55377
Open
Evangelink wants to merge 2 commits into
Open
Conversation
Surface captured test host output when an MTP application exits before handshake, mark the run failed, and recap actionable failures after the summary. Add regression coverage for an unsupported forwarded option. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: fca5f32b-6c6e-4767-a336-248686d7d8ad
|
Azure Pipelines: Successfully started running 1 pipeline(s). 2 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Pull request overview
Backports improved Microsoft.Testing.Platform (MTP) handshake-failure diagnostics into release/10.0.1xx so dotnet test surfaces pre-handshake failures more clearly (captured stdout/stderr, correct “Failed!” headline, and an end-of-run recap).
Changes:
- Track handshake-failure details during the run and re-print a “Handshake failures:” recap after the test-run summary.
- Adjust summary headline selection so handshake failures produce
Failed!instead of a misleadingZero tests ran. - Add/extend regression coverage for invalid-option pre-handshake failures and localize the recap header.
Show a summary per file
| File | Description |
|---|---|
| test/dotnet.Tests/CommandTests/Test/GivenDotnetTestRunsConsoleAppWithoutHandshake.cs | Adds regression asserting stdout/stderr surfacing, failed summary headline, and end-of-run recap for pre-handshake failures. |
| src/Cli/dotnet/Commands/Test/MTP/Terminal/TerminalTestReporter.cs | Tracks handshake failures and appends a recap after the run summary; updates summary precedence. |
| src/Cli/dotnet/Commands/CliCommandStrings.resx | Adds localized resource string for the “Handshake failures:” recap header. |
| src/Cli/dotnet/Commands/xlf/CliCommandStrings.cs.xlf | Adds new trans-unit for the recap header localization. |
| src/Cli/dotnet/Commands/xlf/CliCommandStrings.de.xlf | Adds new trans-unit for the recap header localization. |
| src/Cli/dotnet/Commands/xlf/CliCommandStrings.es.xlf | Adds new trans-unit for the recap header localization. |
| src/Cli/dotnet/Commands/xlf/CliCommandStrings.fr.xlf | Adds new trans-unit for the recap header localization. |
| src/Cli/dotnet/Commands/xlf/CliCommandStrings.it.xlf | Adds new trans-unit for the recap header localization. |
| src/Cli/dotnet/Commands/xlf/CliCommandStrings.ja.xlf | Adds new trans-unit for the recap header localization. |
| src/Cli/dotnet/Commands/xlf/CliCommandStrings.ko.xlf | Adds new trans-unit for the recap header localization. |
| src/Cli/dotnet/Commands/xlf/CliCommandStrings.pl.xlf | Adds new trans-unit for the recap header localization. |
| src/Cli/dotnet/Commands/xlf/CliCommandStrings.pt-BR.xlf | Adds new trans-unit for the recap header localization. |
| src/Cli/dotnet/Commands/xlf/CliCommandStrings.ru.xlf | Adds new trans-unit for the recap header localization. |
| src/Cli/dotnet/Commands/xlf/CliCommandStrings.tr.xlf | Adds new trans-unit for the recap header localization. |
| src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hans.xlf | Adds new trans-unit for the recap header localization. |
| src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hant.xlf | Adds new trans-unit for the recap header localization. |
Copilot's findings
- Files reviewed: 16/16 changed files
- Comments generated: 3
Use localized resources in the regression assertions, normalize control characters in captured host output, and correct the generated localization note. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: fca5f32b-6c6e-4767-a336-248686d7d8ad
3 tasks
Member
Author
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). 2 pipeline(s) were filtered out due to trigger conditions. |
Open
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Backports the minimal Microsoft.Testing.Platform handshake diagnostics from #54501 to
release/10.0.1xx.When an unmatched option is forwarded to an MTP test application and the application exits before the handshake (for example with
InvalidCommandLine/ exit code 5),dotnet testnow:Failed!instead ofZero tests ranThis is the diagnostic companion/backport for #55309. It is intentionally distinct from #55376, which maps
--nologoto MTP's--no-banneronmain.The new recap heading is localized through the normal generated XLF workflow.
Validation
GivenDotnetTestRunsConsoleAppWithoutHandshake: 3 passed