Skip to content
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

Test reporting name #325

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

amishra-u
Copy link

fixes: #319

The TestCaseXmlRenderer class reports displayName for tests marked as dynamic. In JUnit 5, all tests of typem TestTemplateDescriptor are considered dynamic, including tests annotated with @ParameterizedTest, @testtemplate, @testfactory, and @RepeatedTest. Assigning a displayName to these tests is optional, and there is no enforcement of unique display names.

To ensure consistent and unique test identification across tools, use the legacy reporting name instead of displayName for test reporting:

  1. Test names will be identical to those reported by Bazel's native TestRunListener for Vintage tests.
  2. JUnit 5 test names will include parentheses, which is reasonable because JUnit 5 allows template-based tests with the same method name but different arguments.

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.

BazelJUnitOutputListener doesn't log methodName for @ParameterizedTest
1 participant