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
.
note
Code coverage applies to Java-projects only, and thus is valid for IntelliJ IDEA, but not for RubyMine, for instance.
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:
In the IDEA IDE, on the Analyze menu, click Show Code Coverage Data, or use the Ctrl+Alt+F6 keyboard shortcut.
In the Code Coverage Suites dialog, select the desired suite:
In the IDEA IDE, on the Analyze menu, click Show Code Coverage Data, or use the Ctrl+Alt+F6 keyboard shortcut.
In the Code Coverage Suites dialog, choose No coverage.
Open the Color and Fonts dialog (File | Settings | IDE Settings | Editor | Colors and Fonts | Java).
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.
Thanks for your feedback!