Overview
Features
Documentation
Contribute
Eclipse Plugin for Cobertura. Java code coverage integrated into the IDE.
Install
Simply point Eclipse to this
Eclipse Update Site (requires Eclipse 3.5+):
http://ecobertura.johoop.de/update/
Launch
- Open the Coverage Session View (under "Window", "Show View", "Other...", "Cobertura".
- Select the application or test to run.
- Select the respective "Cover As..." command from the main menu, context menu or toolbar button.
- Optionally, you can define class and package coverage filters in the launch configuration (under the tab named "Filters").
Analyze
- Source code lines in source editors are green or red depending on whether they were covered or not.
- Browse the coverage session tree view for detailed information.
- Click the column headers to sort the tree table.
- Jump from the classes in the tree view to their respective source editors.
Have fun!
How does it work?
Upon launching in covered mode, eCobertura will apply any filters defined in the launch configuration. Then it will copy all classes from the output folder into its internal plugin workspace. There, it will instrument any classes that pass the filtering using Cobertura.
Within the launch configuration classpath, the output folder will be replaced by the internal plugin workspace, so that the launch uses the instrumented classes instead of the original ones.
In short, eCobertura does not do in-place instrumentation.
Cobertura will save a "cobertura.ser" file when the launched process terminates. This file will be interpreted by eCobertura and displayed in the Coverage Session View.