Code coverage
There are so many coverage tools available for source code analysis such as EMMA, Corbatura, JaCoCo, and so on. In this section, we'll cover Gradle integration with JaCoCo to find the source code analysis.
Before we get started, we need to understand what code coverage is and why it is important in the test-driven development.
Code coverage is a metric that we can use to check how much of the source code was tested. Higher code coverage means a greater percentage of our code has been tested. Code coverage is typically done in the unit testing cycle. During code coverage, a developer must ensure that different logical paths in the source code have been tested and verified to achieve better code coverage.
Here, it is important to understand that the code coverage is not directly related to code quality. High code coverage does not guarantee that the quality code has been written. A developer must use static code analysis tools such as PMD (https://pmd.github.io/) to find the quality...