TeamCity On-Premises 2021.2 Help

Configuring Test Reports and Code Coverage

This section contains articles concerning support of test reports, code inspections, and code coverage in TeamCity.

Test Reports in TeamCity

TeamCity provides out-of-the-box support for a number of testing frameworks. To reduce the feedback time on test failures, it reports detailed test results on the fly whenever possible. These results are displayed in the build overview. See the list of currently supported testing frameworks.

Many build runners produce test reports automatically, depending on the settings you configure: Gradle, Maven, IntelliJ IDEA Project, Python, Node.js, NUnit and others.

Code Inspection in TeamCity

TeamCity comes with code analysis tools capable of inspecting your source code on the fly, finding and reporting common problems and anti-patterns.

The following inspections tools are bundled with TeamCity:

TeamCity can also be integrated with external reporting tools.

Code Coverage in TeamCity

Code coverage is a number of metrics that measure how your code is covered by unit tests. TeamCity supports the following coverage engines out of the box:

See how to import reports or coverage results from other tools.

To get the code coverage information displayed in TeamCity for the supported tools, you need to configure it in the dedicated section of a build runner's settings page. The following build runners include code coverage support:

Note that currently the Maven2 runner supports only IntelliJ IDEA and JaCoCo coverage engines.

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

The chart for code coverage is also available on the Statistic Charts tab of a build configuration.

For the details on configuring code coverage, refer to the dedicated pages: Configuring Java Code Coverage, Configuring .NET Code Coverage.

Last modified: 25 January 2022