Coveralls is web service created by LEMUR Heavy that helps tracking code coverage over time. Coveralls is free to use for open source projects and it requires that the projects are hosted at GitHub. The service was originally created for Ruby projects, but the provided API allows anybody to create code coverage report clients. Numerous integrations have been created for different languages such as Python, PHP, Node.js and Scala by the open source community, but there was no support for Java projects. I find this odd, because in the enterprise Java world such metrics are everyday life. There are plenty of different coverage tools and metrics platforms available like Cobertura, JaCoCo, SonarQube (previously known as Sonar) and so on.
Coveralls integrates nicely with Travis CI, which is a continuous integration service for GitHub hosted projects. Travis CI is also free to use for open source projects. GitHub, Travis CI and Coveralls now provide a good continuous integration platform for open source projects. A lot of languages are already supported by these tools and GitLab is a nice example of a widely used open source project using the services. Java ecosystem is poorly supported even though it is backed by a large open source community.
I have created coveralls-maven-plugin that can be used to provide coverage reports to Coveralls web service. The plugin also integrates nicely with Travis CI, so that every build run by Travis CI will be reported to Coveralls. This means good tracking of code coverage over time for your projects. The coverage maven plugins can also be configured to fail builds for too low code coverage on unit tests.
Here’s some of the plugin highlights:
- 1.1.0 version supports Cobertura and JaCoCo coverage Maven plugins.
- Fully streaming implementation for fast report generation and small memory footprint. This is good for big projects that could consume the limited resources of Travis CI.
- Contributing to the plugin is fairly easy. Code is clean and has simple interfaces to provide support for additional coverage tools and continuous integration services.
- The plugin is easy to setup. Setting one configuration value is sufficient for most use cases.
- The project is licensed under the MIT license.