About GroboUtils Sourceforge Project For Developers | GroboCodeCoverage version
1.1.0 CoverageReport: GroboCoverage Ant TasksAuthor:Matt Albrecht
All Tasks
Description
deprecated - use grobo-report
instead.
Generates an XML report describing all the coverage tallies for the
classes that were logged during runtime execution. The report combines
the runtime coverage logs with the post-compilation generated data. One
report is created per analysis module. Currently, this task supports
all included channel outputs (DirectoryChannelLoggerFactory ,
CacheDirChannelLoggerFactory , and
MinDirChannelLoggerFactory ).
Nested Elementssimplestyle
Generates one HTML file for each analysis module,
which look something like
this.
ParametersAttribute | Description | Required | prefix | The text to prepend all output HTML file names.
The output name will look like
prefixModuleNamesuffix . Default
prefix is CoverageReport- .
| No | suffix | The text to append to all output HTML file names.
The output name will look like
prefixModuleNamesuffix . Default
prefix is CoverageReport- . Default suffix is
.html .
| No | destdir | The output directory to place the HTML files.
Default directory is . .
| No | removeEmpty | A boolean value. This describes whether the
output report should remove all methods and classes that don't
have any code attributed to them (such as interfaces and
abstract methods). Default is false .
| No |
Nested Elementsparam
Used to pass a parameter to the underlying XSL stylesheet.
The usage is exactly like the param structure
for the style
Ant task.
ParametersAttribute | Description | Required | name | Name of the XSL parameter | Yes | expression | Text value to be placed into the param. | Yes | if | The param will only pass if this property is
set. | No | if | The param will only pass unless this property is
set. | No |
|
|
sourcestyle
Generates a JavaDoc-like collection of HTML files for all the
analysis modules, linking the coverage reports to the source files.
This report shows the contents of the source files and highlights
whichever lines were not covered.
ParametersAttribute | Description | Required | title | The title text to be placed on the top of every
HTML file. Default is Summary Coverage Report .
| No | srcdir | Directory containing the source files.
| Yes | destdir | The output directory to place the HTML files.
Default directory is . .
| No | footertext | Text to be put at the bottom of every
center frame's page (default is an advertisement for
GroboUtils). | No | footerhref | Link to have the footertext
point to (default is an advertisement for GroboUtils). | No | stylesheet | Stylesheet file to use in replacement of
the default. | No | removeEmpty | A boolean value. This describes whether the
output report should remove all methods and classes that don't
have any code attributed to them (such as interfaces and
abstract methods). Default is false .
| No |
Nested Elementssrcdir
In addition to the srcdir attribute, you can include
multiple source directories for searching. The first directory
containing the source file will be used in the report.
ParametersAttribute | Description | Required | name | The name of the directory containing a
source tree.
| Yes |
|
|
ParametersAttribute | Description | Required | datadir | The name of the directory to read the analysis module
generated data from. This same directory should be specified in the
coveragepostcompiler task's datadir attribute as
well.
| Yes | logDir | The name of the directory to read the log output
generated from running the code. This same directory should be
specified in the grobocoverage.properties file.
| Yes | outdir | The name of the directory that will contain the generated
XML documents.
| Yes | reportfileprefix | Text that will prepend each outputted XML document's
file name (default is Coverage-).
| No | reportfileextension | Text that will append each outputted XML document's
file name (default is .xml).
| No | failonerror | Boolean describing if an error in this task should cause
the build to fail (default is false).
| No |
Examples
<coveragereport
datadir="${dirs.test-output}/coverage-data"
logdir="${dirs.test-output}/coverage-log"
outdir="${dirs.test-output}">
</coveragereport>
The <coveragereport> task generates one .xml file
for each analysis module that has data in the
${dirs.test-output}/coverage-data directory, using the
runtime log data found in the ${dirs.test-output}/coverage-log
directory. It also places in the same directory an .xml file
that contains all the analysis module data.
<coveragereport
datadir="${dirs.test-output}/coverage-data"
logdir="${dirs.test-output}/coverage-log"
outdir="${dirs.test-output}">
<simplestyle destdir="${dirs.test-output}" removeempty="true" />
<sourcestyle destdir="${dirs.test-output}/source-report"
removeempty="true" srcdir="src"
title="Summary Coverage Report of My Code">
<srcdir name="${dirs.temp}/generated-source-1" />
<srcdir name="${dirs.temp}/generated-source-2" />
</sourcestyle>
</coveragereport>
Same as above, but this also generates two human-readable reports.
The first (simplestyle) generates one HTML file in the
${dirs.test-output} directory for each analysis module
XML report. The generated file will
look something like this.
The second (sourcestyle) generates a directory hierarchy of framed
HTML pages in the ${dirs.test-output}/source-report
directory. It links the original Java source files into the HTML
by looking in the directories src ,
${dirs.temp}/generated-source-1 , and
${dirs.temp}/generated-source-2 for the source files
corresponding to the covered class files, in that order.
All Tasks
|