You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

Description

The <clover-log> task reports coverage information to the console at different levels.

Parameters

Attribute

Description

Required

initstring

The initstring of the coverage database.

No; if not specified here, Clover will use the default location (${basedir}/.clover). If you have specified an initstring on the <clover-setup> task, you must ensure that <clover-setup> is called prior the execution of this task.

level

Controls the level of detail included in the report. Valid values are summary, class, method, statement

No; defaults to "summary".

filter

comma or space separated list of contexts to ignore when calculating coverage. See Using Coverage Contexts.

No.

span

Specifies how far back in time to include coverage recordings from since the last Clover build. See Using Spans.

No; defaults to "0s".

Nested elements

<Package>

Specifies a named package to restrict the report to. Multiple <package> elements can be specified.

Parameters

Attribute

Description

Required

name

The name of the package to include.

Yes.

<Sourcepath>

Specifies an Ant path that Clover should use when looking for source files.

Examples

<clover-log/>

Prints a summary of code coverage to the console.

<clover-log>
         <package name="com.acme.killerapp.core"/>
 </clover-log>

Prints a summary of code coverage for the package com.acme.killerapp.core to the console.

<clover-log level="statement">
         <package name="com.acme.killerapp.core"/>
 </clover-log>

Prints detailed (source-level) code coverage information for the package com.acme.killerapp.core to the console.

<clover-log level="statement"
	     filter="catch">
         <package name="com.acme.killerapp.core"/>
 </clover-log>

As above, but catch blocks will not be considered in coverage reporting.

<clover-log level="statement">
    <sourcepath>
       <pathelement path="/some/other/location"/>
    </sourcepath>
 </clover-log>

Prints source-level coverage report to the console. Clover will look for source files in the directory /some/other/location.

  • No labels