Open Source Code Coverage Tools in Java

13 projects

Free Java tool that calculates the percentage of code exercised by tests and highlights untested areas. Based on jcoverage; Ant and Maven integration; HTML reports.

Details
CodeCoverInactive

Extensible code coverage tool: statement, branch, loop, and term (Ludewig) coverage; source instrumentation. CLI, Ant, and Eclipse integration; HTML/CSV reports, per-test-case measurement, JUnit integration, test-suite optimization (Boolean Analyzer, Correlation Matrix).

Details
CoverlipseInactive

Eclipse plugin for JUnit code coverage visualization. Block coverage and all-uses coverage (data flow); results in editor and dedicated views; no extra configuration beyond normal JUnit runs.

Details
EMMAInactive

Open-source toolkit for measuring and reporting Java code coverage. Offline or on-the-fly instrumentation; class, method, line, basic block coverage; HTML, XML, text reports with drill-down. Ant and Makefile integration; no source required.

Details

Pure Java code coverage tool using Jakarta BCEL to instrument class files post-compile. Ant tasks for instrumentation and reporting; part of the GroboUtils project.

Details
HanselInactive

JUnit extension that instruments classes under test and verifies branch coverage. Runs functional tests first; then generates "Probes" (one per method/branch) that fail if not covered. Uses BCEL for instrumentation; Ant task and JUnit 4 support.

Details
InsECTInactive

Instrumentation framework for collecting runtime and coverage information from Java programs. Instruments bytecode with probes; extensible for dynamic analysis. Eclipse plug-ins and GUI; uses BCEL.

Details
JBlanketInactive

Tool for assessing and improving method coverage of JUnit test cases. Integrated with JUnit and Ant. Original project site (Hawaii CSDL) archived above; artifacts on Maven Central.

Details
JesterInactive

Finds code not covered by tests by mutating code and re-running tests; if tests still pass, the change is reported. Generates web pages showing mutations that did not cause test failure. Mutation-testing style coverage.

Details

Shared library that loads into a JVMDI-capable Java VM (1. 4+) and records executed lines. Coarse-grained coverage, suitable for many use cases.

Details
NoUnitInactive

Evaluates JUnit test quality by generating reports that show how many project methods are tested and how well. Graphical view of test coverage.

Details
QuiltInactive

Java tool that measures coverage by instrumenting bytecode at load time. Integrates with JUnit, Ant, and Maven; statement and branch coverage; transforming class loaders and report generation.

Details

Free code-coverage tool for Java: measures test effectiveness and which code was executed. Instrument then run tests; reports from project level down to line level. Original site gone; Cobertura is a well-known successor.

Details