
plugins.eclipse.emma-plugin-eclipse.doc.usage.html Maven / Gradle / Ivy
Show all versions of emma_ant Show documentation
Emma Eclipse plugin user guide
Usage
Interaction with Emma is done in several places. There are global property
settings, project property settings, color and font settings. Commands are generally
given through the context menu for packages, projects, source files and jars.
- The global preference pages
Window> Preferences> Emma
- The properties page for a Java project
[javaProject]> Properties
- The context menu for a Java project
[javaProject]> Emma> ...
- The context menu of a source file
[sourceFile]> Emma> ...
- The context menu of a package
[package]> Emma> ...
- The context menu of a jar file
[jarFile]> Emma> ...
- Decoration enabling/disabling
Window> Preferences...> General> Apperance> Label decorations> Emma filter decorator> ...
Window> Preferences...> General> Apperance> Label decorations> Emma coverage decorator
(not documented yet)
- Global colors and fonts
Window> Preferences...> General> Apperance> Colors and Fonts> Emma> ...
(not documented yet)
Preferences
The preference pages can be used to set things that affects all projects globally.
You can set the preferences for inclusion and exclusion decorations. This only affects
inclusions/exclusions that are set directly for projects and packages. Filters set globally
for projects isn't shown directly in the interface.
You can also set which values from the report that are displayed decorating the file names.
You can select to show class, method, block and line coverage. Finally you can also select if name
color and styling should be enabled to indicate if a category passes the coverage thresholds.
Global preferences page
Java projects
The project properties can be used to set general settings for Emma and the
project context menu is used to execute global commands.
The context menu can be used to generate reports and reset data from a coverage
session. Resetting data means that all meta data from the classes gets regenerated
and all collected runtime data is discarded. This is useful since all data from all
invocations gets collected into the same file. Only if you reset the data, collecting
will start from scratch. Reports can be generated in html, xml or text formats.
Once you have generated some coverage data you can also open the detailed report for
the whole project. The report will open in an inlined browser window in Eclipse and
can be used to drill down or up in the report.
Java project context menu.
The property pages are used to set global settings for each project. There are
three property pages. The main page, the output page and the filter page.
The main page is used to enable/disable Emma. When Emma is enabled, all classes belonging
to a project is updated and a meta data file gets generated. Furthermore, the project
build path also gets updated. The meta data then gets constantly updated when files
are changed or removed. When Emma are disabled, all manipulations of the project
are removed, so if you are to make a project release, just open the property page
and uncheck the enablement check box and press Ok. On the main page you can also
find the threshold levels that are used to determine if a class passes the validation
limits. Validation limits can be set for both packages and classes and determines
how the classes and packages gets decorated in the interface.
Properties main page
The filter properties page is used to set filtering properties for the classes in
a project. Please see the section Filters for a full explanation
of filtering in Emma.
Properties filter page
The output page is used to set where the files and folders that Emma generates
gets output. You can use this page to set where the manipulated jars and where the
reports gets output. Most settings should be
self explanatory. All values are paths relative to the project root and the default
values are a good guidance on how the paths should look.
Properties output page
Java source files and packages
Java source files and packages can be used to include or exclude specific classes from monitoring.
Select one or several files and right click them. In the context menu, the category Emma
can be used to include or exclude the files or packages. There's also an option to remove the filtering
from the file, so that project filter settings can be applied to the it. A file
that has been excluded from monitoring won't show in reports at all. A file that has
been included will show no matter what the global filter is set to.
A minus sign will appear in front of the name of the files that have been excluded and a plus sign
on those that are included.
Once you have generated some coverage data you can also open the detailed report for
a package or a file. The report will open in an inlined browser window in Eclipse and
can be used to drill down or up in the report.
Java source file and package context menu.
Jar file monitoring
You can use Emma to create monitored copies of existing jar files. This feature is
very handy if you intend to deploy the jars at some server and then collect coverage data
from an existing environment. Just right click one or several jar files and select Create monitored
jar from the Emma category. Monitored copies of the archives are created at the root of the
project togheter with the meta data generated from Emma. These jars can then be used to
monitor a live environment.
Jar context menu.
Output directory for copied jars, with metadata file.