The Unit Tests Code Coverage plugin is a NetBeans 6.0 / 5.0 (5.5, 5.5.1) module which displays
the unit tests code coverage in the NetBeans java sources editor.
Features
The functionality provided by the plugin helps to visually (and quickly) identify the
portions of java code with low coverage and helps in targeted tests development. The plugin provides the following features:
- Java sources coloring according to the coverage information from the latest unit tests execution
- Automated java code markup updated after running unit tests or reopening file
- Code coverage markup info displayed at the java editor sidebar
-
Currently Java Application, Java Library, Java Project with Existing Sources and NetBeans module projects
are supported.
How to use
The module must be enabled for each project by invoking the Coverage | Activate Coverage Collection action
from the project node's context menu. Then, as unit tests are run, the module will update the code coverage data
and markup the editor's lines accordingly. The lines which are fully covered by unit tests are
annotated with green color in java editor and the line covered partially are annotated in yellow. The colors
can be modified in Tools | Options | Fonts & Colors | Annotations.
Reports are now supported. You can view coverage reports for your project by clicking YOUR_PROJECT_NODE->Coverage->Show Project Coverage Statistics menu item
Release notes
* Due to some limitations coverage is deactivated every time a user closes the IDE.
User has to activate coverage after reopening the IDE
* Plugin always works with the latest coverage data available. This is done to help user analyze
what a specific test covers. To view the full picture run all tests for a project (for example,
choose 'Test Project' context menu action for a Java Application project)
Your feedback
Please send all your questions, suggestions and other feedback to mikk@netbeans.org