Clover will record the code coverage information each time you run your application or a unit-test. This coverage information is available for viewing using IDEA.
The coverage information can be browsed using the "Cloverage" window. The upper portion of the tool window contains a project class browser with inline coverage information:
The tool bar at the top of the browser contains the following buttons:
The coverage treemap report allows simultaneous comparison of classes and package by complexity and by code coverage. The treemap is divided by package (labelled) and then further divided by class (unlabelled). The size of the package or class indicates its complexity (larger squares indicate great complexity, while smaller squares indicate less complexity). Colours indicate the level of coverage, as follows:
The percentage shown in the yellow box is the code coverage for the class currently under the mouse.
View the TreeMap report for current project using thebutton.
The types of classes you want included in the Clover Coverage View can be set with Context Filters:
Screenshot: Setting Context Filters
The lower portion of the Tool Window contains various Metrics for the currently selected node in the browser:
Screenshot: Clover Tool Window Summary
In addition, the plugin can annotate the Java code with the coverage information. This can be turned on by pressing the Show Coveragetoolbar button.
Screenshot: Annotated Java Code
If you do not have "Auto Coverage Refresh" enabled, you will need to press the Refresh Button in the Main Toolbar or the Clover Tool Window to see the updated coverage information.
If a source file has changed since a Clover build, then a warning will be displayed alerting you to fact that the inline coverage information may not be accurate. The coverage highlighting will be yellow, rather than the red shown above.
Now you perfectly know how your application is covered. But how to efficiently navigate between tests and application code? Read the 3. Exploration of test results in IDEA chapter.