Let’s look at some of the code coverage tools and the official URLs used for test coverage analysis of the java source code.
Cobertura is a free Java-based code coverage reporting tool that calculates the test coverage of the source code by the tests. The tool is based on jcoverage.
Official URL: https://cobertura.github.io/cobertura/
We can use the tool in Maven project by adding the Maven dependency to the pom.xml
EclEmma is a free Java code coverage tool for Eclipse IDE. We can use the tool directly from the Eclipse tool.
Download Eclipse IDE. ( https://www.testingdocs.com/downloading-and-extracting-eclipse-ide/)
We can download and install the Emma tool using the Eclipse Market place.
More information about Eclipse Marketplace:
JaCoCo is a code coverage library for Java, which has been created by the EclEmma team.