Code coverage analysis is handled by Jacoco and, optionally, coverage reports can be published to

Code coverage analysis

The repository is configured to report code coverage using Jacoco. A test coverage report can be generated by running the coverage Gradle task:

./gradlew coverage

Combined coverage reports for all modules in the repository will be created, capturing coverage data from both unit and system tests. Two styles of reports are generated by default:

  • A machine friendly XML report is created at build/reports/jacoco/coverage/coverage.xml.
  • A human friendly HTML report is created at build/reports/jacoco/coverage/html/index.html.

Settings for code coverage are configured in the Creek coverage build convention, which can be customised as needed.

Code coverage publishing

The repository is configured to publish code coverage of tests to when the coveralls Gradle task is executed.

./gradlew coveralls

This task is executed as part of the default CI GitHub workflow.

If you wish to make use of for your code coverage needs then you will need to:

  1. Create a account.
  2. Import your new repository into Coveralls, noting the REPO TOKEN.
  3. Store the Coveralls REPO TOKEN in a repository secret in GitHub named COVERALLS_REPO_TOKEN.