Book Image

Android Application Development with Maven

Book Image

Android Application Development with Maven

Overview of this book

Table of Contents (14 chapters)

Measuring test coverage


Having a complete test suites of the source code is very important to know that the application is bug-free and it has the expected behavior. However, when the application is growing, it's hard to keep track of which classes are adequately tested or not. It's hard to know, on other words, the test coverage of our application.

Thankfully, there are several tools that compute the test coverage, and they integrate very well with Maven; so in this section we will pick two of them (the most popular and stable ones) and we will see what is the necessary configuration to gather this information while running our unit tests.

JaCoCo

Java Code Coverage (JaCoCo) (http://www.eclemma.org/jacoco/trunk/doc/maven.html) tool has become the most popular tool for java code coverage in the last couple of years. The main reasons that made it the first choice is that it is free/open source, it continuously evolves, it is fast, and does on-the-fly bytecode instrumentation which leads to more...