EMMA is an open-source toolkit for measuring and reporting Java code coverage. EMMA distinguishes itself from other tools by going after a unique feature combination: support for large-scale enterprise software development while keeping individual developer’s work fast and iterative at the same time. Every developer on your team can now get code coverage for free and they can get it fast! EMMA is so lightweight developers can use it during the process of writing tests instead of waiting for a “test build”. This gets code coverage where it belongs: helping with design and implementation before the code is checked in. Chances are, you’ve come here already knowing what coverage is all about and are, in fact, wondering what EMMA offers and why it is worth checking out. Explore the rest of this site to see why. EMMA features at a glance: EMMA can instrument classes for coverage either offline (before they are loaded) or on the fly (using an instrumenting application classloader). This flexibitily is quite unique, making EMMA a one stop coverage tool for projects ranging from simple standalone applications to complex J2EE deployments. Supported coverage types: class, method, line, basic block. EMMA can detect when a single source code line is covered only partially. Coverage stats are aggregated at method, class, package, and “all classes” levels. Output report types: plain text, HTML, XML. All report types support drill-down, to a user-controlled detail depth. The HTML report supports source code linking. Output reports can highlight items with coverage levels below user-provided minimums. Coverage data obtained in different instrumentation or test runs can be merged together. EMMA does not require access to the source code and degrades gracefully with decreasing amount of debug information available in the input classes. EMMA can instrument individial .class files or entire .jars (in place, if desired). Efficient coverage subset filtering is possible, too. Makefile and ANT build integration are supported on equal footing. EMMA is quite fast: the runtime overhead of added instrumentation is small (5-20%) and the bytecode instrumentor itself is very fast (mostly limited by file I/O speed). Memory overhead is a few hundred bytes per an instrumented Java class. EMMA is 100% pure Java, has no external library dependencies, and works in any Java 2 JVM (even 1.2.x). Not “version 1.0” software… Although a relative newcomer to the open-source arena, EMMA and especially its predecessor versions have been in use on real-life enterprise software projects at Trilogy since early 2001.