-
Notifications
You must be signed in to change notification settings - Fork 290
Add --test-format CLI option for customizable test name display #7134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs
Outdated
Show resolved
Hide resolved
src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs
Outdated
Show resolved
Hide resolved
src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TestNameFormatter.cs
Outdated
Show resolved
Hide resolved
Evangelink
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot add unit tests and acceptance tests
Unit tests and acceptance tests have already been added:
The tests cover all placeholders (, , , , , ) and various scenarios including parameter handling and fallback behavior. |
Evangelink
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot please update MTP and MSTest acceptance tests on help and info to mention this new CLI option
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Updated MTP and MSTest acceptance tests for help and info to include the
|
|
For the reasons described in the issue, I think this will just add more maintenance than it is worth. |
Summary
This PR implements a new CLI option
--test-formatthat allows users to customize how test names are displayed in console output during test discovery (--list-tests) and execution (--output detailed).Implementation
Changes Made
--test-formatto PlatformCommandLineProvider<fqn>,<ns>,<type>,<method>,<display>,<asm>Supported Placeholders
<display>- Display name (default)<fqn>- Fully qualified name (namespace.type.method with parameters)<ns>- Namespace<type>- Type name<method>- Method name<asm>- Assembly name (short name without version/culture/token)Usage Examples
Related Issues
--list-tests#3221Notes
<placeholder>syntax as suggested in the agent instructionsOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.