Table of Contents
The behavior of EMMA tools and runtime is influenced by a number of EMMA properties (see Section 2, “EMMA property summary” for the full list). These properties address several needs:
Given an EMMA property (from the tables in Section 2, “EMMA property summary”), it can be specified in several different ways:
The following shows different ways of overriding the default coverage session dump file pathname from ANT or command line. Using emma.properties or properties ANT is convenient when you want to load a large block of EMMA property settings without keeping them in your makefile or build.xml:
From ANT:
<emmajava enabled="${emma.enabled}" libclasspathref="emma.lib" dumpsessiondata="yes" properties="my.properties" classname="Main" classpathref="run.classpath" />where file my.properties sets session.out.file to some mydir/myfile value.
From command line:
>java emmarun -Dsession.out.file=mydir/myfile ... >java emmarun -properties my.properties ... >java -cp {directory containing emma.properties} emmarun ... >java -Demma.session.out.file=mydir/myfile emmarun ... >java -Demma.properties=my.properties emmarun ...where file my.properties sets session.out.file to some mydir/myfile value.
EMMA property lookup order. Because of multiple ways to specify the same EMMA property, it is necessary to document the exact property lookup mechanism in order to disambiguate potential conflicts. The following lists all possible property lookup layers, in the order from the least specific to the most specific (in other words, later definitions override earlier definitions):
Property shortcuts. In the special case of report generation properties (report.*) there is one additional complication. Any property name that follows the report.name patterns is actually a report property shortcut in the sense that is applies to all report types (plain text, HTML, XML). For some aspects of report generation (e.g., report.units) this is very appropriate, but for others (e.g., report.out.encoding) you are likely to want report type-specific settings. To do so, you can specify a report.report_type.name property. For example, report.txt.out.encoding is more specific than report.out.encoding as far as the plain-text report generator is concerned. Note that the <report> ANT task makes this more convenient that the command line case, because it provides convenience override attributes on all nested <txt>, <html>, etc elements.