Run jacoco report without Maven or Gradle

839 Views Asked by At

We want to our Jacoco code coverage in some of our Java projects. Unfortunately, their maven and gradle configurations do not include generating Jacoco test reports.

There are 40+ Java projects and I don't have the time to fix all their pom.xml or gradle build files to add jacoco test coverage reports. What is the fastest way to scan them for code coverage? is there a way do to this without the need for modifying pom.xml or gradle build files.

I am using Eclipse IDE

1

There are 1 best solutions below

0
On

Have you tried to add EclEmma (from Help Eclipse Marketplace and search for EclEmma)?

After the installation of EclEmma:

  • the context menu of a project also contains a Coverage As entry
  • And besides the debug button in the main toolbar will also be another button for running java code with code coverage analysis.
  • Once a program is run with code coverage a Coverage View will show up in the Eclipse IDE.

(PS recently released EclEmma 3.1.5 supports recently released Java 17 thanks to JaCoCo 0.8.7)