Details
-
Suggestion
-
Resolution: Won't Fix
-
None
-
Clover 4.0.2
Ant 1.8
Java 1.8
TestNG 6.8.7
Description
TestNG allows test methods to be specified by a @Test annotation at the class-level. TestNG will recognise all public methods of that class as test methods:
@Test public class TestClass { public void testSomething() { /* ... */ } private void imNotATest() { /* ... */ } }
This appears to be unsupported by Clover, which does not detect these methods as test methods during the instrumentation phase. This results in all such test methods being run during an optimized test run.
Workaround: Remove the @Test annotation from the class and instead annotate each test method.
Related Clover documentation: https://confluence.atlassian.com/display/CLOVER/Clover+test+detection