Code Coverage
Last modified: 20 April 2023Code coverage is a number of metrics that measure how your code is covered by unit tests. TeamCity supports the following coverage engines:
Java: IntelliJ IDEA coverage engine, EMMA open-source toolkit.
.NET: NCover 1.x, 3.x and PartCover.
To get the code coverage information displayed in TeamCity, you need to configure it in the dedicated section of a Build Runner settings page. (Build Configuration Home Page > Edit Build Configuration Settings > 3.Runners). The following build runners include code coverage support:
Note, that currently Maven2 runner supports only IntelliJ IDEA coverage engine. The code coverage results can be viewed on the Overview tab of the Build Results Home Page; detailed report is displayed on the dedicated Code Coverage tab. Moreover, the chart is available for code coverage on the Statistics of the build configuration.
For the details on configuring code coverage, please, refer to the dedicated pages: Java Code Coverage, .NET Code Coverage.
Thanks for your feedback!