show display Name only instead of method name
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.
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!