Working with Java code coverage results

Java code coverage is now strategically based on open source packages, in particular JaCoCo. Starting from 16.0, the Eclipse IDE no longer supports generating code coverage for Java applications. You can import Java code coverage results into the Code Coverage Results view and work with the imported results.

JaCoCo code coverage results

You can use JaCoCo to collect code coverage for your pure Java or hybrid applications and then import the results into the Code Coverage Results view. When you produce JaCoCo code coverage data as part of a build or build pipeline, you can convert the results into CCZip format with the ccconvert.sh script and then import the .cczip files. After the results are imported into the view, you can merge Java and other code coverage results to produce a single combined report for all the code.

If you have EclEmma installed in the Eclipse IDE, you can use JaCoCo within the IDE directly.

For more information about collecting code coverage for Java or hybrid applications with JaCoCo and integrations with various tools, such as Maven, see the JaCoCo Java Code Coverage Library documentation.

Legacy Java code coverage results

You can see result location Java Workspace Results (Deprecated) in the Code Coverage Results view only if you have Java code coverage results under result location Java Code Coverage in a previous release of the Eclipse IDE. These results are automatically converted from the legacy format (.coveragedata files) into the CCZip format (.cczip files) and migrated into result location Java Workspace Results (Deprecated). For more information, see Working with result locations.

You can also import legacy Java code coverage results that are not in the workspace. The results are automatically converted into the CCZip format before they are imported into the Code Coverage Results view.