Skip to content

Expose --no-banner in MTP dotnet test help - #55412

Merged
Evangelink merged 1 commit into
dotnet:mainfrom
Evangelink:dev/amauryleve/expose-no-banner-option
Jul 22, 2026
Merged

Expose --no-banner in MTP dotnet test help#55412
Evangelink merged 1 commit into
dotnet:mainfrom
Evangelink:dev/amauryleve/expose-no-banner-option

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Summary

  • expose MTP's --no-banner switch as an explicit alias of dotnet test --no-logo
  • include --no-banner in the MTP help output
  • cover the alias in parser tests

Follow-up to #55376 and this review comment.

Validation

  • Built the Debug SDK redist
  • Passed all 64 TestCommandDefinitionTests and MTPHelpSnapshotTests.VerifyMTPHelpOutput tests

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 46cf5608-480b-4734-ad57-e9db735e3bca
Copilot AI review requested due to automatic review settings July 22, 2026 15:16
@Evangelink
Evangelink requested review from a team as code owners July 22, 2026 15:16
@azure-pipelines

Copy link
Copy Markdown
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.

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.

Pull request overview

This PR updates the dotnet test Microsoft.Testing.Platform (MTP) command definition so that MTP’s --no-banner switch is explicitly recognized as an alias of the existing --no-logo/-nologo option, and ensures the help output and parser tests reflect that behavior.

Changes:

  • Add --no-banner as an alias on the MTP NoLogoOption.
  • Update the MTP help snapshot to display --no-banner alongside existing --no-logo aliases.
  • Extend parser test coverage to include --no-banner in the set of accepted aliases.
Show a summary per file
File Description
src/Cli/Microsoft.DotNet.Cli.Definitions/Commands/Test/TestCommandDefinition.MicrosoftTestingPlatform.cs Adds --no-banner as an alias to the MTP no-logo option so it’s recognized by the SDK parser.
test/dotnet.Tests/CommandTests/Test/TestCommandParserTests.cs Adds a test case ensuring --no-banner results in a single forwarded --no-banner test-app argument.
test/dotnet.Tests/CommandTests/Test/snapshots/MTPHelpSnapshotTests.VerifyMTPHelpOutput.verified.txt Updates expected MTP help output to include --no-banner in the option alias list.

Copilot's findings

  • Files reviewed: 3/3 changed files
  • Comments generated: 0

@Evangelink
Evangelink enabled auto-merge July 22, 2026 15:20
[DataRow("--nologo")]
[DataRow("-nologo")]
[DataRow("/nologo")]
[DataRow("--no-banner")]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Shouldn't options like /nobanner, -nobanner be tested as well?

Options.Add(VerbosityOption);
Options.Add(NoRestoreOption);
Options.Add(NoBuildOption);
NoLogoOption.Aliases.Add("--no-banner");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't have much knowledge in this code base, but if --no-logo, --nologo, -nologo, /nologo work without calling NoLogoOption.Aliases.Add(), why must it be called for --no-banner?

@Evangelink
Evangelink merged commit fc099e5 into dotnet:main Jul 22, 2026
35 checks passed
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-rc1 milestone Jul 23, 2026
@Evangelink
Evangelink deleted the dev/amauryleve/expose-no-banner-option branch July 24, 2026 11:33
@Evangelink

Copy link
Copy Markdown
Member Author

/backport to release/11.0.1xx-preview7

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/11.0.1xx-preview7 (link to workflow run)

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.

4 participants