This is the documentation for Clover 3.3. View this page for the

Unknown macro: {spacejump}

of Clover, or visit the latest Clover documentation.

Skip to end of metadata
Go to start of metadata

Detection of test methods

Clover is able to detect test methods for following test frameworks and code patterns.

JavaDoc tags

This approach can be used for Java 1.4, which does not support annotations. In such case, test methods can be marked using JavaDoc tags:

TestNG style

/** @testng.test */
class MyTest {
    /** @testng.test */
    void myTestMethod()  { }

JUnit style

/** @test */
void myTestMethod() { }


Methods with a following signature:

public void test***()


Methods annotated with one of the following:{Foo.class})


Methods annotated with:





Methods annotated with one of the following:



Methods annotated with one of the following:


Usage context

These patterns are being used by Clover for per-test coverage, test optimization and reporting.


  • No labels