Creating Code Coverage reports with JaCoCo Maven Plugin

Oh Boy! Setting up Coverage for a project, Yes it is quite daunting task and getting everything right will take some tweaking and planning. In this post we will explore on how we can use JaCoCo maven plugin to create code coverage for both Unit Tests and Integration Tests.

JaCoCo Maven plugin is useful for two things.

  1. It provides access to JaCoCo runtime agent which records all the execution coverage data.
  2. It provides us a nice coverage reports from the execution data recorded by the agent.

Configuration

Let’d dive into configuration, we will configure the JaCoCo plugin provide coverage reports for both unit tests and integration tests.

Leave a comment