Mission
JaCoCo should become the standard backend technology for code coverage analysis in Java VM based environments. The focus is providing a lightweight, flexible and well documented library for integration with various build and development tools.
There are several open source coverage technologies for Java available. While implementing the Eclipse plug-in EclEmma the observation was that none of them are really designed for integration. Most of them are specifically fit to a particular tool (Ant tasks, command line, IDE plug-in) and do not offer a documented API that allows embedding in different contexts. One of the best and widely used available open source tools is EMMA. While EclEmma is based on it the EMMA library is not actively maintained any more by the original author. Due to the lack of regression tests maintenance and feature additions will become very difficult.
JaCoCo should become the standard backend technology for code coverage analysis in Java VM based environments. The focus is providing a lightweight, flexible and well documented library for integration with various build and development tools. Ant tasks, a Maven plug-in and the EclEmma Eclipse plug-in are provided as reference usage scenarios.
Product Definition
Features
- Coverage analysis of instructions (C0), branches (C1), lines, methods, types and cyclomatic complexity.
- Based on Java byte code and therefore works also without source files.
- Simple integration through Java agent based on-the-fly instrumentation. Other integration scenarios like custom class loaders are possible through the API.
- Framework agnostic: Smoothly integrates with Java VM based applications like plain Java programs, OSGi frameworks, web containers or EJB servers.
- Support for different JVM languages.
- Several report formats (HTML, XML, CSV).
- Remote protocol to request execution data dumps from the coverage agent at any point in time.
- Ant tasks to collect and manage execution data and create structured coverage reports.
- Maven plug-in to collect coverage information in Maven builds.
Non-Functional Characteristics
- Simple usage and integration with existing build scripts and tools.
- Good performance with minimal runtime overhead especially for large scale projects.
- Lightweight implementation with minimal dependencies on external libraries and system resources.
- Comprehensive documentation.
- Fully documented APIs (JavaDoc) and examples for integration with other tools.
- Regression tests with full functional test coverage based on JUnit test cases.