Clover Report Task
Description
Generates current reports in HTML or XML formats. The report task has no parameter attributes and all configuration occurs in the nested element. The nesting of elements within the <clover-report> task is as follows:
<clover-report>
<current>
<format/>
</current>
</clover-report>
<current>
Generates a current coverage report. Specify the report format using a nested Format element. Valid formats are XML and HTML.
Attributes
| Attribute | Description | Required |
|---|---|---|
| title | The title of the report | Yes |
| output | The output destination of the report. Reports can either generate a single file or a directory of related files. | Yes |
<format>
Specifies the output format and various options controlling the rendering of a report.
Attributes
| Attribute | Description | Required |
|---|---|---|
| type | The output format to render the report in. Valid values are xml, html. | Yes |
| bw | Specify that the report should be black and white. This will make HTML reports smaller (with no syntax hilighting) | No; defaults to "false" |
| orderBy | Specify how to order coverage tables. This attribute
has no effect on XML format. Valid values are:
|
No; defaults to PcCoveredAsc |
| noCache | (HTML only) if true, insert nocache directives in html output. | No; defaults to "false" |
| srclevel | if true, include source-level coverage information in the report. | No; defaults to "true" |
| showempty | If true, classes, files and packages that do not contain any executable code (i.e. methods, statements, or branches) are included in reports. These are normally not shown. | No; defaults to "false" |
| tabwidth | (Source level reports only) The spacing of tab stops. All tabs are expanded to to the next tabstop using spaces in reports. | No; defaults to 4 |
Examples
This example shows a minimal <clover-report> instance to produce an HTML report. Once this has run, the report will be available in the report directory.
<clover-report>
<current title="Test Report" output="report">
<format type="html"/>
</current>
</clover-report>
This example produces a minimal report. It does not include source and the coverage bars are not rendered.
<clover-report>
<current title="test" output="report">
<format type="html"
bw="true"
srclevel="false"
hidebars="true"/>
</current>
</clover-report>
