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.
- It provides access to JaCoCo runtime agent which records all the execution coverage data.
- It provides us a nice coverage reports from the execution data recorded by the agent.
Let’d dive into configuration, we will configure the JaCoCo plugin provide coverage reports for both unit tests and integration tests.