| EclEmma 1.4.3 | Java Code Coverage for Eclipse |
|
Headless Code Coverage for EquinoxEclEmma is a user interface centric tool implemented for and on top of the Eclipse IDE. EclEmma also provides support for code coverage analysis of Eclipse applications itself, e.g. for JUnit plug-in tests. While a code coverage tool within the IDE supports the individual developer with his/her daily work, so called headless tools are required for testing in automated environments like (continuous) build systems. Based on the techniques described in this paper the EclEmma Equinox Runtime easily adds code coverage to any Java application running on OSGi/Equinox. FeaturesThe EclEmma Equinox Runtime is a single plug-in that can be added to any Eclipse application and provides code coverage information for the executed Java code. It has several configuration options e.g. for selecting the plug-ins to analyze. How does it work?The EclEmma Equinox Runtime is a so called OSGi framework extension that uses specific hooks of the Equinox OSGi implementation to dynamically instrument plug-in classes using the EMMA code coverage library. UsageSystem RequirementsThe EclEmma Code Coverage for Equinox runtime requires Eclipse 3.2 or higher and Java 1.4 or higher. As Eclipse/Equinox changed some internal APIs with 3.5, you need to select from different extension versions:
Headless ModeThis will be the typical scenario when you run you plug-in tests in your automated build.
PDE ModeIf you want to study or modify the extension bundle you may directly import it to your PDE workspace and launch a Eclipse application in development mode. The extension works for any OSGi/Equinox based launch type, i.e. Eclipse application OSGi framework and JUnit plug-in test.
Configuration Options
All configuration options are given by system properties. They can be passed into the
JVM with the -Demma.session.out.file=testcoverage.es
will set the property
Analyzing the Coverage ResultThe code coverage runtime create a single EMMA coverage session file containing Meta data about all the classes of the bundles under test and the actual coverage information. This file can be imported into EclEmma and analyzed within Eclipse. Alternatively a HTML report can be created using EMMA's Ant task. In both cases several coverage session files from different launches can be merged into a single report. AcknowledgmentThe EclEmma Equinox Runtime has been contributed and is maintained by Mikkel T Andersen. Any questions and comments about the project are welcome in our forums. | ||
| Copyright © 2006, 2009 Mountainminds GmbH & Co. KG · Marc R. Hoffmann | Validate XHTML/CSS · Last Modified 2009-08-26 in rev. 721 |