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
.
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:
- Enable showing code coverage information in the editor.
- Disable showing code coverage information in the editor.
- Configure code coverage highlighting.
- In the IDEA IDE, on the menu, click , or use the Ctrl Alt F6 keyboard shortcut.
- In the Code Coverage Suites dialog, select the desired suite:
- In the IDEA IDE, on the menu, click , or use the Ctrl Alt F6 keyboard shortcut.
- In the Code Coverage Suites dialog, choose No coverage.
- 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.