Description
How to reproduce?
- Run any @parameterized test inside rules_jvm package.
- Check the generated text.xml file, the name in test case only contains index of the test and ignores the method name.
Sample result test in MixedTest.java file
Expected
expected name to contain testMethodName and index
<testcase name="bootstrap[1] goGreek=alpha" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.MixedTest" time="0.03">
Actual
But test name only contains index
<testcase name="[1] goGreek=alpha" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.MixedTest" time="0.03">
Issue
JUnit5 internally treats @ParameterizedTest as a specialized form of a test template, storing it as an instance of TestTemplateTestDescriptor in the DiscoveryResult. For execution, TestTemplateTestDescriptor leverages DynamicTestExecutor, which triggers the dynamicTestRegistered method on registered listeners. As a result, BazelJUnitOutputListener incorrectly classifies ParameterizedTest as a dynamic test.
Metadata
Metadata
Assignees
Labels
No labels