2. EMMA property summary

Table 3.1. EMMA file output properties

Property:coverage.out.file
Default:coverage.ec
Tools affected:EMMA runtime (EMMA-instrumented classes)
Description:

In the offline instrumentation mode, setting this property is currently the only way to override the pathname of the runtime coverage output file. If the pathname is not absolute, it is resolved relative to the current JRE directory (user.dir system property). Any existing data in the target file is overwritten unless the coverage.out.merge mode is true.

Property:coverage.out.merge
Default:true
Tools affected:EMMA runtime (EMMA-instrumented classes)
Description:

When runtime coverage data is dumped by EMMA runtime, this property specifies whether any existing data in the target file should be merged into or overwritten.

Property:metadata.out.file
Default:coverage.em
Tools affected:<instr>/instr
Description:

For tools that can output class instrumentation metadata, this property sets the output file pathname. If the pathname is not absolute, it is resolved relative to the current JRE directory (user.dir system property). Any existing data in the target file is overwritten unless the metadata.out.merge mode is true.

Property:metadata.out.merge
Default:true
Tools affected:<instr>/instr
Description:

For tools that can output class instrumentation metadata, this property specifies whether any existing data in the target file should be merged into or overwritten.

Property:session.out.file
Default:coverage.es
Tools affected:<emmajava>/emmarun, <merge>/merge
Description:

For tools that can output combined metadata+coverage (i.e., session) data, this property sets the output file pathname. If the pathname is not absolute, it is resolved relative to the current JRE directory (user.dir system property). Any existing data in the target file is overwritten unless the session.out.merge mode is true.

Property:session.out.merge
Default:true
Tools affected:<emmajava>/emmarun, <merge>/merge
Description:

For tools that can output combined metadata+coverage (i.e., session) data, this property specifies whether any existing data in the target file should be merged into or overwritten.

Table 3.2. EMMA report generation properties

Property:report.units
Default:instr
Tools affected:<emmajava>/emmarun, <report>/report
Description:

During coverage report generation, this property selects either weighted (instr) or unweighted (count) coverage metrics. See Report units. for more details.

Property:report.depth
Default:

report.depth is set to method and overridden for the plain-text report type:

  • report.txt.depth: all

Tools affected:<emmajava>/emmarun, <report>/report
Description:

During coverage report generation, this property selects the report depth level covered by the report. Valid values (in order of increasing level of detail) are all, package, source, class, and method. See Report depth. for more details.

Property:report.columns
Default:

report.columns is set to name,class,method,block,line and overridden for the plain-text report type:

  • report.txt.columns: class,method,block,line,name

Tools affected:<emmajava>/emmarun, <report>/report
Description:

During coverage report generation, this property specifies which coverage metrics and in which left-to-right order to render in the report output (the XML report is an exception because it is not columnar: instead, the column order is used for top-to-bottom XML element rendering). Valid column ids are the item name and various types of coverage: name, class (class coverage), method (method coverage), block (block coverage), and line (line coverage). Coverage types that are not available for a given item type and debug info level are automatically ignored. It is perfectly legal so use only a subset of all possible metrics (e.g., reporting both block and line coverages is somewhat of an overkill).

Property:report.sort
Default:+block,+name,+method,+class
Tools affected:<emmajava>/emmarun, <report>/report
Description:

During coverage report generation, this property specifies how to sort data by coverage metrics: which metrics to sort by, sort directions, and sort order. It should be set to a comma-separated list of metric ids (name, class, method, block, and line), with each metric id prefixed with “+” for ascending or “-” for descending sort direction. Multiple sorts are applied in the left-to-right order of the metric ids as specified by this property. It is perfectly legal to sort only a subset of all possible metrics/columns.

Property:report.metrics
Default:method:70,block:80,line:80,class:100
Tools affected:<emmajava>/emmarun, <report>/report
Description:

During coverage report generation, this property specifies how to highlight data that fails minimum coverage requirements (only applies to plain-text and HTML reports). It should be set to a comma-separated list of metric id-value pairs, with the value being the minimum required coverage percentage (separated by a colon). Metrics ids are name, class, method, block, and line. It is not necessary to specify the required percentage for every metric used in a given report.

Property:report.out.file
Default:

report.out.file is not set and is instead overridden for all report types:

  • report.txt.out.file: coverage.txt
  • report.html.out.file: coverage/index.html
  • report.xml.out.file: coverage.xml

Tools affected:<emmajava>/emmarun, <report>/report
Description:

During coverage report generation, this property can be used to override the default locations for the output files. When a relative pathname is specified, it is resolved relative to the current JRE directory (user.dir system property). Note that the HTML report generator creates secondary HTML files beyond the report home page file. These files will be put in a subdirectory that is a sibling of the home page file and it thus makes sense to have at least one subdirectory level specified for report.html.out.file (as is the case with the default value). EMMA will create any intermediate output directories as needed. Output files are always overwritten.

Property:report.out.encoding
Default:

report.out.encoding defaults to the JRE file.encoding system property and is overridden for the HTML and XML report types:

  • report.html.out.encoding: ISO-8859-1
  • report.xml.out.encoding: UTF-8

Tools affected:<emmajava>/emmarun, <report>/report
Description:

During coverage report generation, this property can be set to customize the character encoding used for the output files. Default values provided by EMMA should be adequate in most situations.

Table 3.3. EMMA instrumentation properties

Property:instr.do_suid_compensation
Default:true
Tools affected:<emmajava>/emmarun, <instr>/instr
Description:

Because the bytecode instrumentor used by EMMA needs to synthesize a static class initializer when there is none already and because class initializers are considered for serialization UID calculations by the default SUID algorithm, EMMA will add a compensating serialVersionUID field to the instrumented class if this property set to true. This is useful for running applications and tests when Java classes are (de)serialized from previously saved content or across client-server connections when not all JVMs are running instrumented classes. This property can be set to false to slightly speed up EMMA processing if such compensation is not needed (e.g., when no serialization is used).

Property:instr.exclude_synthetic_methods
Default:true
Tools affected:<emmajava>/emmarun, <instr>/instr
Description:

Depending on the compiler used, the original application classes can contain any number of "synthetic" methods that implement certain Java language features (class literals, inner class accessors, etc) through bytecode that has no representation in the original sources. In most cases, excluding these methods from instrumentation and coverage reporting is the correct thing to do. This is the default EMMA behavior.

Property:instr.exclude_bridge_methods
Default:true
Tools affected:<emmajava>/emmarun, <instr>/instr
Description:

J2SE 1.5 compilers introduce a new kind of "synthetic" methods used for mapping new features like generics to the existing class format. These methods do not have a source code representation. In most cases, excluding these methods from instrumentation and coverage reporting is the correct thing to do. This is the default EMMA behavior.

Table 3.4. EMMA logging properties

Property:verbosity.level
Default:info
Tools affected:all tools, including EMMA runtime (EMMA-instrumented classes)
Description:

This property sets the verbosity of EMMA logging. Valid values are (in the order of increasing verbosity):

  • silent (same as severe): only severe errors are reported;
  • quiet (same as warning): only warnings and severe errors are reported;
  • info: default verbosity level, with EMMA reporting on completion of various activities, warnings, and errors
  • verbose: this setting makes EMMA chattier than normal, with extra progress reporting;
  • trace1, trace2, trace3: these settings enable internal tracing (useful mostly for debugging).