You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected outcome:
PMD reports a violation: JUnit 4 tests that execute tests should use the @Test annotation, JUnit 5 tests should use @Test, @RepeatedTest, @TestFactory, @TestTemplate or @ParameterizedTest at line 4, but that's wrong - @Test annotation is present by the test method.
The text was updated successfully, but these errors were encountered:
Affects PMD Version:
7.0.0-rc3
Rule:
JUnit4TestShouldUseTestAnnotation
Description:
Rule complaints about missing
@Test
annotation even if it is present, but fromorg.testng.annotations
package.Probably TestNG
org.testng.annotations.Test
annotation is missing in rule definition: https://github.com/pmd/pmd/blob/3e2de671907a2b2984880e50105072fd6c26116c/pmd-java/src/main/resources/category/java/bestpractices.xml#L783C75-L783C75Code Sample demonstrating the issue:
Expected outcome:
PMD reports a violation:
JUnit 4 tests that execute tests should use the @Test annotation, JUnit 5 tests should use @Test, @RepeatedTest, @TestFactory, @TestTemplate or @ParameterizedTest
at line 4, but that's wrong -@Test
annotation is present by the test method.The text was updated successfully, but these errors were encountered: