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
Description:
The first code sample uses the annotations org.testng.annotations.*, and the second one uses org.junit.*. The analysis results of the two cases should be equivalent because these annotations are equivalent. However, PMD reports a warning in the second sample and no warnings in the first sample. PMD should report a warning in Case 1 like Case 2.
adangel
changed the title
[java]A false negative about JUnitTestsShouldIncludeAssert and testng
[java] JUnitTestsShouldIncludeAssert: A false negative with TestNG
May 11, 2023
adangel
changed the title
[java] JUnitTestsShouldIncludeAssert: A false negative with TestNG
[java] JUnitTestsShouldIncludeAssert: false negative with TestNG
May 11, 2023
Affects PMD Version:7.0.0-rc1
Rule: JUnitTestsShouldIncludeAssert
Please provide the rule name and a link to the rule documentation:
https://docs.pmd-code.org/latest/pmd_rules_java_bestpractices.html#junittestsshouldincludeassert
Description:
The first code sample uses the annotations
org.testng.annotations.*
, and the second one usesorg.junit.*
. The analysis results of the two cases should be equivalent because these annotations are equivalent. However, PMD reports a warning in the second sample and no warnings in the first sample. PMD should report a warning inCase 1
likeCase 2
.Code Sample demonstrating the issue:
Case 1
Case 2
Expected outcome: The analysis results of the two classes should be the same and both should be reported a violation.
PMD reports no violation in the first class, but that's wrong. That's a false negative. PMD should treat
testng
likejunit
.Running PMD through: CLI
The text was updated successfully, but these errors were encountered: