Working with Code Coverage
The TeamCity Plugin for IntelliJ IDEA provides access to the server-side code coverage information and visualizes the portions of the code covered by unit tests. Prior to using this feature, make sure that recording code coverage data is enabled in your run configuration. By default, code coverage marking is visible in the gutter area. The covered lines are marked in green , partially covered - in yellow , and uncovered lines are marked in red .
When showing code coverage is enabled, the Project view of the IDE shows the percentage of classes and lines covered by unit tests:
This section describes how to:
To enable code coverage highlighting
In the IDEA IDE, on the Ctrl+Alt+F6 keyboard shortcut.
menu, click , or use theIn the Code Coverage Suites dialog, select the desired suite:
To disable code coverage highlighting
In the IDEA IDE, on the Ctrl+Alt+F6 keyboard shortcut.
menu, click , or use theIn the Code Coverage Suites dialog, choose No coverage.
To configure code coverage highlighting
Open the Color and Fonts dialog (
).Select the desired color scheme.
In the Java tab, set up highlighting color and style for the following options: Full line coverage, Partial line coverage, and Uncovered line.