Comment on page
Testability and activity icons
Cover Plugin for IntelliJ gutter icons
The Diffblue Cover Plugin for IntelliJ inserts icons in the "gutter" area next to methods and classes in currently open files in IDEA which:
- indicate whether the Diffblue Cover Plugin for IntelliJ can write tests
- when clicked, will write tests
There are five different icons that can be displayed next to your classes and methods. Three of these icons provide information about whether the Diffblue Cover Plugin for IntelliJ is able to write tests directly for the Java element, two provide information about ongoing activities of the Diffblue Cover Plugin for IntelliJ which affect whether it can write tests for your code at this moment.
This icon indicates that the Diffblue Cover Plugin for IntelliJ can probably create tests.
Click on this icon to write tests for the adjacent class or method.
This icon indicates that the Diffblue Cover Plugin for IntelliJ can not create tests that directly call this item, and that this is "by design".
For example, the Diffblue Cover Plugin for IntelliJ cannot write tests for private methods because they cannot be called directly from a test method. Since you have chosen this access level to enforce proper encapsulation of your code, the Diffblue Cover Plugin for IntelliJ assumes that this method is not meant to be directly tested. Use Diffblue Cover to create tests for callers of the method in order to test it.
Nothing will happen when clicking on this icon.
This icon indicates that the Diffblue Cover Plugin for IntelliJ can not create tests for this item unless the item is refactored to make it more testable.
For example, the Diffblue Cover Plugin for IntelliJ cannot write tests for overridden methods in anonymous inner classes, because it is not possible to directly instantiate those classes and call their methods in a unit test. To allow the Diffblue Cover Plugin for IntelliJ to write tests for such a method, the class should be extracted as an accessible named class.
Nothing will happen when clicking on this icon.
This icon indicates that the Diffblue Cover Plugin for IntelliJ is indexing your project, cannot yet determine testability information for the adjacent item and therefore cannot determine whether it is likely to be able to write tests for that item.
Clicking on this icon will attempt to write tests for the adjacent item, but be aware no tests will be created if the Diffblue Cover Plugin for IntelliJ is not able to write tests for it.
This icon indicates that the Diffblue Cover Plugin for IntelliJ is currently writing tests for your Java code in the background. Please consult the IDEA event log for further information.
Nothing will happen when clicking on this icon.
Testability and activity icons appear in the "gutter" area of the IDEA editor pane whenever Java files are opened. The Diffblue Cover Plugin for IntelliJ updates these icons when:
- a new file is opened
- the project is reindexed, typically on compilation or when dependencies change
- gutter icon preferences are changed
In order to ensure that icons displayed on a file that you are editing are fully up-to-date, close and reopen that file. Note in particular that the icons are not interactively updated as the file is changed.
Last modified 2mo ago