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 and a Maven plug-in are provided as reference usage scenarios. Other tools like a ready to use Eclipse plug-in (future version of EclEmma) might follow.
Product Definition
Features
- Statement (C0) and branch (C1) coverage analysis.
- 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.
- Several Ant task to collect and manage execution data and create structured coverage reports.
- Planned: Better reporting of Exception within blocks.
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.
- Fully documented API (JavaDoc) including descriptions of the basic concepts.
- Regression tests with full functional test coverage based on JUnit test cases.