vscode-java-test icon indicating copy to clipboard operation
vscode-java-test copied to clipboard

show display Name only instead of method name

Open martinlippert opened this issue 7 months ago • 1 comments

While working on some other features (in the Spring tooling space), I got feedback from a colleague that the test explorer should really display the "display name" of tests INSTEAD of the method name, not as an additional label behind the test method name.

martinlippert avatar Jul 28 '25 11:07 martinlippert

Hi @martinlippert, I'm an AI Support assistant here to help with your issue. While the team reviews your request, I wanted to provide some possible tips and documentation that might help you in the meantime.

No built-in support exists today for replacing the method name with JUnit’s @DisplayName in the Test Explorer. You can track or upvote the feature request and use a custom DisplayNameGenerator as a workaround:

  • Feature request: Show display name in test report (applies equally to Test Explorer)
    https://github.com/microsoft/vscode-java-test/issues/956
  • Example of a custom JUnit 5 @DisplayNameGenerator
    https://leeturner.me/posts/building-a-camel-case-junit5-displaynamegenerator/
Other references with low confidence
  • Issue #1448 – Display name is not updated after running
    https://github.com/microsoft/vscode-java-test/issues/1448#issuecomment-1192112636

The team will respond to your issue shortly. I hope these suggestions are helpful in the meantime. If this comment helped you, please give it a 👍. If the suggestion was not helpful or incorrect, please give it a 👎. Your feedback helps us improve!

github-actions[bot] avatar Nov 13 '25 04:11 github-actions[bot]