JaCoCo
note
To ensure the coverage data is collected properly, make sure your tests run in (one or more) separate JVMs.
Ant and Intellij Idea Project runners: this is the default setting for TestNG, for Junit test task, set
fork=true
.Maven runner: set
forkCount
to a value higher than.Gradle runner: this is the default setting for Gradle tests.
Enabling JaCoco coverage
tip
By default, in TeamCity the jacoco.sources property is set to "." , which means that TeamCity will scan whole checkout directory including all subdirectories for your sources. Check that your classfiles are compiled with debug information (including the source file info) to see with highlighted source code in the report.
Importing JaCoCo coverage data to TeamCity
Thanks for your feedback!
Was this page helpful?