Generate Emma reports from coverage data.
Task package: | com.vladium.emma |
Java package: | |api:package-summary:?linkClass=| |
Category: | Analyzing tasks |
Since: | 0.5 |
EntityFS-aware? | No* |
Implements: | ActionTaskFactory |
See also: | EmmaInstrumentationTF EmmaMergeTF |
Description:
Generate one or several Emma reports
from coverage data. The reports are created by running Emma's emma
command in a forked Java process.
For more information on the different properties, see the Emma Reference Manual.
The following strategy is used for searching for the java
command to use:
- Use a Java executable suggested by an ExtJavaTaskDecorator, if any
- Use the
javaExecutable
property, if set - Use the file
bin/java[.exe]
relative to thejavaHome
property, if set - Use the file
bin/java[.exe]
relative to theJAVA_HOME
environment variable, if set - Search for
java[.exe]
in the paths listed in thePATH
environment variable
Required properties
Properties
assertions | top |
Are assertions enabled? More fine-grained assertion settings can be set by setting JVM options.
- Setter method:
setAssertions(boolean b)
parameters:b
– Should assertions be enabled?- Default value:
false
(assertions are not enabled).- See also:
- jvmOptions
decorators | top |
A list of ExtJavaTaskDecorator:s. Decorators are used to configure the program to run.
- Setter method:
addDecorator(ExtJavaTaskDecorator d)
Add a decorator to the end of the list.parameters:d
– A Java task decorator- Setter method:
addDecorators(Collection<? extends ExtJavaTaskDecorator> c)
Add a collection of decorators. The decorators are added to the list in the order that they are returned from the collection.parameters:c
– A collection of decorators.
javaExecutable | top |
The path to the java[.exe]
command.
Decorators may also set the Java executable to use. In
that case, that setting take precedence.
- Setter method:
setJavaExecutable(Object o)
parameters:o
– The path to thejava[.exe]
command.
Interpreted byArgumentInterpreter.getFile(java.lang.Object)
.- Default value:
- The Java executable to use is, in this order of precedence:
- A Java executable set by any of the
decorators
. - This property.
- A Java executable found in the catalog referenced by the
javaHome
property, if set. - A Java executable found in the catalog referenced by the
JAVA_HOME
environment variable, if set. - A Java executable found in the directories referenced by the
PATH
environment variable.
- A Java executable set by any of the
- See also:
- javaHome
javaHome | top |
The location of the Java Runtime Environment or Java Development Kit to use
- Setter method:
setJavaHome(Object o)
parameters:- See also:
- javaExecutable
javaVMType | top |
The Java virtual machine type to use (client or server).
- Setter method:
setJavaVMType(JavaVMType t)
parameters:t
– The virtual machine type:JavaVMType.CLIENT
JavaVMType.SERVER
- Default value:
- The JRE:s default virtual machine type, probably client.
jvmOptions | top |
Options for the java
command. Options are
arguments to java
given before the class to run, see the JDK
documentation on java
.
- Setter method:
addJvmOption(String s)
parameters:s
– Add an option- Setter method:
addJvmOptions(Collection<String> c)
parameters:c
– Add a collection of options. The options are added in the order that they are returned from the collection.
logFooter | top |
The message that is logged to info
level
after the task has been successfully run.
- Setter method:
setLogFooter(String s)
parameters:s
– The footer message.- Default value:
- Empty (no footer message is logged.)
- See also:
- logHeader
logHeader | top |
The message that is logged to info
level
before the task is run.
- Setter method:
setLogHeader(String s)
parameters:s
– The header message.- Default value:
- A task class specific message.
- See also:
- logFooter
outputFiles (required) | top |
A map between Emma output formats and the file to save output for that format in. Output will be generated for each format added.
- Setter method:
addOutputFile(EmmaReportFormat f, Object o)
Add one output file.parameters:f
– The output format.o
– The file to store output for that format in.
Interpreted byArgumentInterpreter.getFile(java.lang.Object)
.- Setter method:
clearOutputFiles()
Clear the list of output files.
properties | top |
A property file with Emma report configuration. See the Emma reference manual for details.
- Setter method:
setProperties(Object o)
parameters:
reportLevel | top |
This property is used to change the Report level for all task created by this task factory. The report level is changed for the thread running the task when the it is run, and is restored to its previous level when the it is done.
- Setter method:
setReportLevel(Level l)
Set the report levelparameters:l
– The new report level.
sourceDirectories | top |
A collection of source path directories.
- Setter method:
addSourceDirectories(Collection<?> c)
Add a collection of source directories.parameters:c
– A collection of source directories.
Interpreted byArgumentInterpreter.getFile(java.lang.Object)
.- Setter method:
addSourceDirectory(Object o)
Add one source path directory.parameters:- Setter method:
clearSourceDirectories()
Clear the list of source directories.- Setter method:
setSourceDirectories(Collection<?> c)
Set a collection of source directories, discarding previously set source directories.parameters:c
– A collection of source directories.
Interpreted byArgumentInterpreter.getFile(java.lang.Object)
.- Setter method:
setSourceDirectory(Object o)
Set one source directory, discarding all previously set source directories.parameters:
sources (required) | top |
A list of input files (.ec
and
.em
files).
- Setter method:
addSource(Object o)
Add one source file.parameters:- Setter method:
addSources(Collection<?> c)
Add a collection of source files.parameters:- Setter method:
clearSources()
Clear the list of source files.- Setter method:
setSource(Object o)
Set one source file, discarding previously set files.parameters:- Setter method:
setSources(Collection<?> c)
Set a collection of source files, discarding previously set files.parameters:
traceLogging | top |
If trace logging is enabled for a task, it reports its configuration before it is run.
Trace logging may also be enabled globally for all tasks by calling TraceMode.setTraceMode(boolean).
- Setter method:
setTraceLogging(boolean b)
Enable or disable trace logging.parameters:b
– Enable trace logging?
Examples
See EmmaInstrumentationTF for an usage example.* That a task is not EntityFS-aware means that it is not aware of DirectoryView filters (it uses them as plain Directory:s) and also that it usually requires that the entities it takes as arguments are in a File-based file file system. (That they are ECFileResolvable.) A non File-resolvable entity can be made so by using the SchmantFileSystems.makeFileResolvable(org.entityfs.EFile) method.