java emma report
{-in data files
...} {-r report types
...} [-sp sourcepath
...] [common options
]
-in, -input
... meta/coverage data files
-r, -report (
... txt
|html
|xml
)
-sp, -sourcepath
... list of source directories
.java
source files. The local path names within each directory
should reflect class package names. (Currently, only the HTML report
generator uses this data, and only at
method
report depth.) report generation options
...
Unlike its ANT equivalent, report command line tool does not have dedicated options for controlling coverage report generation. If necessary, they can be set using generic -D, -properties, and other mechanisms.
So, for example, to change the default location of the HTML report you would override the report.out.file property:
>java emma report -Dreport.html.out.file=mydir/mycoverage.html ...(
report.html.out.file
can be abbreviated to
report.out.file
if the command generates
a single report type)Generate plain text and XML report types, both with their default settings:
>java emma report -r txt,xml -in coverage.em -in coverage.ec
Generate the HTML report only, but override the default output location:
>java emma report -r html -in coverage.em,coverage.ec -sp src/ -Dreport.html.out.file=mycoverage/coverage.html
Generate three report types, with common metrics and column
sorting, but with different report depth and column
orderings. Use -properties
option to pull in a large number of report property overrides:
>java emma report -r txt,xml,html -props my.properties -in coverage.em,coverage.ec -sp src/where file
my.properties
contains:
report.sort = +block,+name,+method,+class report.metrics = method:70,block:80,line:80,class:100 report.depth = package report.txt.out.file = coverage/coverage.txt report.txt.columns = class,method,block,line,name report.xml.out.file = coverage/coverage.xml report.html.out.file = coverage/coverage.html report.html.depth = method report.html.columns = name,class,method,block,line
Generate an HTML report with some customization, load metadata and runtime coverage data from a single session file:
>java emma report -r html -in coverage.es -sp src/ \ -Dreport.columns=name,method,line \ -Dreport.sort=+line,+name \ -Dreport.metrics=line:80
The default EMMA command line tool behavior is not to use
System.exit()
on exit unless an explicit
-exit
option is specified. If that is done, the error codes returned via
System.exit()
are as follows:
0 | Successful completion. |
1 | Failure due to incorrect option usage. This error
code is also returned when command line usage
(-h )
is requested explicitly. |
2 | All other failures. |