Generate Test Coverage Report

Test coverage reports are available as both direct console output as well as a report for your site documentation. To add the coverage report to the generated site, add the following to your reporting configuration:

<reporting>
  <plugins>
    ...
    <plugin>
      <groupId>eu.lindenbaum</groupId>
      <artifactId>maven-erlang-plugin</artifactId>
      <version>2.1.0</version>
      <reportSets>
        <reportSet>
          <reports>
            <report>coverage</report>
          </reports>
        </reportSet>
      </reportSets>
    </plugin>
    ...
  </plugins>
</reporting>  

This will add only the test coverage report to your site, generated as the file erlang-coverage-report.html, and added to the reports in the generated site reports menu.

NOTE: by default both EDoc and test coverage reports are generated when adding the plugin without specific reportSets to the reporting section of your pom.

If you want you may also get a coverage report generated directly in the console. Simply call the coverage mojo using mvn erlang:coverage and a report will be generated. Here is an example of what the output might look like:

Console coverage output.