clover-html-report

Still need help?

The Atlassian Community is here for you.

Ask the community

Description

The <clover-html-report> task generates a full HTML report with sensible default settings. If configured, a history point is also generated prior to generation of the full report. 

 

If you need more options, please use the <clover-report> task, which provides more functionality, such as:

  • generating reports in HTML, PDF, JSON, XML formats
  • generating multiple reports linked with each other
  • generating custom charts, defining metrics, 'movers', overviews etc
  • pointing to source location different than during compilation

 

Parameters

Attribute

Description

Required

coverageCacheSize

This is a performance tuning option, which is used to specify the maximum size of coverage data kept in memory when generating an HTML report. Accepts storage values such as 256m (256 megabytes) or 1g (1 gigabyte). Also accepts the value "nocache" to force all coverage data to be loaded into memory.

No. Default is 256m.

historydir

The directory for Clover history points. If this attribute is set, a new history point will be generated prior to the generation of the full report. For more information, see <clover-historypoint>.

No.

historyIncludes

An Ant GLOB to select specific history point files within the historyDir directory

No. Default is clover-*.xml.gz

initstring

The path to the Clover database. If not specified, Clover will use the initstring set by a previous execution of <clover-setup/> in the current build sequence. Otherwise, the default database location will be used.

No.

maxtestsperfile

This limits the number of tests displayed for each file.

No.

numThreads

The number of threads to start when generating a HTML report. A value of 0 will disable multi-threading for report generation. This is a performance tuning option.

No. Default is 2.

outdir

The directory to write the report to.

Yes.

projectName

Overrides the project name set in the Ant build file. This is used for display purposes only.

No; defaults to the project name of the Ant build file.

showUniqueCoverage

Calculate and show unique per-test coverage (for large projects, this can take a significant amount of time). Defaults to
 - true for Clover 3.1.4 and older
 - false for Clover 3.1.5 and newer.

No.

testresultsdir

The directory containing the XML results of the unit tests. Clover will look for all TEST*.xml files in this directory. This attribute is generally not required by most users, as the built-in test results will provide all required information in the majority of cases. For more details please see 'Advanced Usage'.

No.

title

The title to use in the report.

No.

Examples

<clover-html-report outdir="clover/report"/>

This is the simplest way to generate an HTML report. It will be written to the directory "clover/report".

 

<clover-html-report outdir="build/clover/report"
                    historydir="clover/historypoints"
                    title="MyProject Coverage"/>

This will generate a report in the "build/clover/report" directory. A history point will be created in the "clover/historypoints" directory, and all history points in that directory will be used to generate the historical section of the report. The report will be titled "MyProject Coverage".

Last modified on Oct 5, 2012

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.