General

Why should I use the emma-maven-plugin?

There are a number of maven plugins that measure code coverage:

Each of these measure coverage in slightly different ways and have different licenses. Which tool you use depends on your requirements.

[top]


Why do my tests run twice?

This is a common question. The short answer is "because it is good for you". More detailed reasons are:

  • The first run ensures that all your tests work. The second run measures code coverage.
  • Instrumentation of your code in order to measure code coverage can have side-effects which cause your tests to:
    • Pass when the uninstrumented tests fail
    • Fail when the uninstrumented tests pass
    These situations can happen more often than you think.

[top]