TeamCity
 
You are viewing the documentation for an earlier version of TeamCity.

JaCoCo

Last modified: 20 April 2023

Since TeamCity 8.1, TeamCity supports JaCoCo, a Java Code Coverage tool allowing you to measure a wide set of coverage metrics and code complexity. JaCoCo is available for the following build runners: Ant, IntelliJ IDEA Project, Gradle and Maven.

TeamCity supports the java agent coverage mode allowing you to collect coverage without modifying build scripts or binaries. No additional build steps needed - just choose JaCoCo coverage in a build step which runs tests:

  1. In the Code Coverage section, select JaCoCo as a coverage tool in the Choose coverage runner drop-down.

  2. Set up the coverage options - refer to the description of the available options below.

The code coverage results can be viewed on the Overview tab of the Build Results page; detailed report is displayed on the dedicated Code Coverage tab.