Comparison of code coverage tools


OpenClover Atlassian Clover Cobertura JaCoCo JCov Code Cover PIT
Home page
  www www www www www www www
Source files (tick) (tick) (error) (error) (error) (error) (error)
Class files (error) (error) (tick) off-line instrumentation (tick) off-line and on-the-fly instrumentation (tick) off-line and on-the-fly instrumentation (tick) (tick)
Coverage metrics
Method (tick) (tick) (error) (tick) (tick) (tick) (error)

Statement (1)

(tick) (tick) (error) (error)


linear block

(tick) (error)

Line (1)

(error) (error) (tick) (tick) (error) (tick)
Branch (tick) (tick) (tick) (tick) (tick) (tick) (error)
MC/DC (error) (error) (error) (error) (error) (tick) (error)
Instruction (error) (error) (error) (tick) explanation (error) (error) (error)
Global coverage (tick) (tick) (tick) (tick) (tick) (tick) (tick)
Per-test coverage (tick) (tick)

(tick) via sonar

(tick) JMX / sonar (tick) via extensions (tick) (tick) lists tests per file
Mutation coverage (error) (error) (error) (error) (error) (error) (tick)
Source code metrics
Available metrics 20+ metrics, also custom ones cyclomatic complexity cyclomatic complexity (question) (error) (error)

Report types

HTML (tick) details (tick) details (tick) (tick) (question) (tick) (tick)
PDF (tick) (tick) (error) (error) (question) (error) (error)
XML (tick) (tick) (tick) (tick) (tick) (error) (tick)
JSON (tick) (tick) (error) (error) (question) (error) (error)
Text (tick) (tick)

(tick) via cobertura:check

(error) (question) (error) (error)
CSV (error) (error) (error) (tick) (question) (tick) (error)
Data management and report filtering
Merging of coverage databases (tick) clover:merge (tick) clover:merge (tick) (tick) via <jacoco:merge> (tick) (tick) (error)
Historical reporting (tick) details (tick) details (tick) via sonar (tick) via sonar (question) (error) (error)
Selecting scope of code coverage file patterns, class patterns, method patterns (entire signature), code block type, statement's regular expression, code complexity, CLOVER:OFF/ON code comments

file patterns,

code annotations

class patterns (question) file patterns package patterns
Cross-report linking (tick) (tick) (error) (tick) via <structure> element (question) (error) (error)
Supported languages
Java (tick) (tick) (tick) (tick) (tick) (tick) (tick)


Clover recognizes Groovy-specific language constructs, such as "?.", "?:" operators, properties, methods with default arguments. It also handles Grails-specific AST transformations such as controller classes. Thanks to this, you can see more accurate data in reports (compared to pure byte-code instrumentation tools).
(tick) (tick) (question) (error) (error)
AspectJ (tick) (details) (tick) (details) (question) (question) (question) (question) (question)
Other (error) (error) (tick) instrumentation is class-based so theoretically any JVM language is supported, but it may lack good reporting (esp. for language-specific constructs); it may also have problems with synthetic methods etc.
Supported JDK

1.6-1.9 (JRE/JDK)

1.3-1.9 (for "-source" level setting)

1.6-1.8 (JRE/JDK)

1.3-1.8 (for "-source" level setting)

1.5-1.7 1.5-1.8 1.0-1.8 1.5-1.7 1.5-1.8
Supported test frameworks
JUnit (tick) (tick) (error) (4) (tick) (5)
(question) (tick) (tick)
TestNG (tick) (tick) (error) (4) (tick) (5)
(question) (error) (tick)
Spock (tick) (tick) (error) (4) (error) (4) (question) (error) (tick)


It's possible to define custom patterns for tests, based on file names, class signatures, method signatures (including annotations and javadoc tags). More details.

(error) (4) (error) (4) (question)


It's possible to define test boundaries by special instructions put in code comments


IDE integrations

IntelliJ IDEA (tick) (tick) (error) (tick) (question) (error) (tick)
Eclipse (tick) (tick)

(tick) eCobertura

(tick) (question) (tick) (tick)
NetBeans (error) (error) (error) (tick) (question) (error) (error)
Build tools integrations
command line (tick) (tick) (tick) (tick) (tick) (tick) (tick)
Ant (tick) (tick) (tick) (tick) (question) (tick) (tick)
Maven (tick) (tick) (tick) (tick) (question) (error) (tick)
Grails (tick) (tick)

(tick) code-coverage

(error) (question) (error) (error)
Gradle (tick) (tick)

(tick) gradle-cobertura-plugin

(tick) (question) (error) (tick)
SBT (error) (error)

(tick) cobertura4sbt

(tick) (question) (error) (error)

CI servers integrations

Bamboo (tick) (tick) (error) (error) (question) (error) (error)
Hudson (tick) (tick) (tick) (error) (question) (error) (error)
Jenkins (tick) (tick) (tick) (tick) (question) (error) (tick)
TeamCity (error) (error) (error) (tick) (question) (error) (error)

Other integrations

Sonar (tick) (tick) (tick) (tick) (question) (error) (tick)
JIRA (tick) (tick) (error) (error) (question) (error) (error)

Development activity

Last release 4.3.1 in Aug 2018, about one feature release per year

Clover 4.1.2 is the last release published by Atlassian. Since 11-Apr-2017 Clover is open source. See blog post and FAQ.

minor activity,

last release - 2013

actively developed,

few releases / year


minor activity,

last release - 2011

actively developed,

few releases / year

Technical support

  community support, handled by Clover developers

Atlassian Support, 24h response

(for customers with active maintenance subscription)

open source community open source community (question) open source community open source community
Subjective summary
Advantages OpenClover has the same feature set as Atlassian Clover, it is being maintained by former Clover developers.

Clover has great and highly configurable HTML reports, per-test code coverage and test optimization, distributed per-test coverage and many tool integrations. It is no longer developed by Atlassian.

Easy to use thanks to off-line byte code instrumentation. You can measure coverage without having the source code. It has very nice and easy to navigate HTML report. Very easy to integrate thanks to the on-the-fly byte code instrumentation. You can measure coverage without having the source code. It has nice HTML report (example). (question) It has the most detailed code coverage metric (MC/DC), which may be useful for critical systems (medical, aeronautical etc). The Eclipse plug-in comes also with a cool Boolean Expression Analyzer view and a Test Correlation matrix. It has also an interesting feature to start/stop test case via JMX, which can be useful for manual testing. PIT is a tool for mutation coverage, which means it will not only measure line coverage of your code but will also perform mutations in application logic in order to check how well written your tests are.
Disadvantages Due to a fact that Clover is based on source code instrumentation, integration requires a build - it's necessary to recompile code with Clover. Most Clover's integrations have an automatic integration feature, but in some cases you may need to add Clover JAR to a class path or set some Clover options. Classes must be compiled with debug option. Classes must be compiled with debug option. (question) Last release has been performed 3 years ago. The HTML report generated is quite fragmented - source code is shown separately for every method.  

1. Statement and line metrics are roughly similar in terms of their granularity (i.e. code has roughly one statement per line). Statement coverage has huge advantage over line coverage in case when language uses many short statements in a single line (a good example is Java8 stream with several map() and filter() calls) - it's more precise as it can detect partially covered lines.

4. While it's possible to instrument test classes and run test frameworks with Cobertura and JaCoCo, there is no built-in, dedicated support for these frameworks. Which means that standard HTML report shows neither test results nor per-test coverage. There is also no per-test data in Eclipse IDE (EclEmma, based on JaCoCo).

5. Sonar can generate separate coverage data sets for every test case and show them in a combined report. See


Q: Why Emma is not included in this report?

A: The original Emma is a dead tool, last release has been made in 2005. On the other hand, the Eclipse Emma (EclEmma), which was originally based on Emma, since version 2.0 (released 2011) is based on JaCoCo. So its feature set is the same as for JaCoCo.