Junit Code Coverage using Gradle, Jacoco

For your Java application you need to check the code coverage of your Junit test classes. Code coverage ensures your code quality for the Junit test cases you have written for your functionalities of the application. Here I am going to show you how you can use Jacoco plugin to test the coverage. Currently it supports instruction, branch, line, method and class coverage which is pretty enough you can expect from this kind of tool. Additionally, it can measure and report cyclomatic complexity for methods and summarize the complexity for…

Continue

Junit Code Coverage with Jacoco

Introduction In this post I will show you how to work with Junit code coverage with JaCoCo code coverage library, which is quite a new maven plug-in that provides the JaCoCo runtime agent to your tests and allows basic report creation. Currently it supports instruction, branch, line, method and class coverage which is pretty enough you can expect from this kind of tool. Additionally, it can measure and report cyclomatic complexity for methods and summarize the complexity for classes and packages.

Continue