EclEmma 3.1.8 Java Code Coverage for Eclipse Drag to your running Eclipse workspace to install EclEmma Java Code Coverage
Eclipse Community Award 2008
JaCoCo
Inspected with sonarqube
jobs at mtrail
The Java Specialists' Newsletter

Overview

Screenshot

EclEmma is a free Java code coverage tool for Eclipse, available under the Eclipse Public License. It brings code coverage analysis directly into the Eclipse workbench:

  • Fast develop/test cycle: Launches from within the workbench like JUnit test runs can directly be analyzed for code coverage.
  • Rich coverage analysis: Coverage results are immediately summarized and highlighted in the Java source code editors.
  • Non-invasive: EclEmma does not require modifying your projects or performing any other setup.

Since version 2.0 EclEmma is based on the JaCoCo code coverage library. The Eclipse integration has its focus on supporting the individual developer in an highly interactive way. For automated builds please refer to JaCoCo documentation for integrations with other tools.

Originally EclEmma was inspired by and technically based on the great EMMA library developed by Vlad Roubtsov.

The update site for EclEmma is https://update.eclemma.org/. EclEmma is also available via the Eclipse Marketplace Client, simply search for "EclEmma".

Features

Launching

EclEmma adds a so called launch mode to the Eclipse workbench. It is called Coverage mode and works exactly like the existing Run and Debug modes. The Coverage launch mode can be activated from the Run menu or the workbench's toolbar:

Launching Toolbar

Simply launch your applications or unit tests in the Coverage mode to collect coverage information. Currently the following launch types are supported:

  • Local Java application
  • Eclipse/RCP application
  • Equinox OSGi framework
  • JUnit test
  • TestNG test
  • JUnit plug-in test
  • JUnit RAP test
  • SWTBot test
  • Scala application

Analysis

On request or after your target application has terminated code coverage information is automatically available in the Eclipse workbench:

  • Coverage overview: The Coverage view lists coverage summaries for your Java projects, allowing drill-down to method level.
  • Source highlighting: The result of a coverage session is also directly visible in the Java source editors. A customizable color code highlights fully, partly and not covered lines. This works for your own source code as well as for source attached to instrumented external libraries.

Additional features support analysis for your test coverage:

  • Different counters: Select whether instructions, branches, lines, methods, types or cyclomatic complexity should be summarized.
  • Multiple coverage sessions: Switching between coverage data from multiple sessions is possible.
  • Merge Sessions: If multiple different test runs should be considered for analysis coverage sessions can easily be merged.

Import/Export

While EclEmma is primarily designed for test runs and analysis within the Eclipse workbench, it provides some import/export features.

  • Execution data import: A wizard allows to import JaCoCo *.exec execution data files from external launches.
  • Coverage report export: Coverage data can be exported in HTML, XML or CSV format or as JaCoCo execution data files (*.exec).