The <clover-historypoint> task records a coverage history point for use in historical coverage reports. The basic nesting of elements within the <clover-historypoint> task is as follows:







Specifies an override date for this history point. This allows for generation of past historical data for a project.

No; defaults to the timestamp of the current coverage data.


Specifies a date format string for parsing the "date" attribute. The string must contain a valid java.text.SimpleDateFormat pattern.

No; defaults to java.text.SimpleDateFormat using the default pattern and date format symbols for the default locale.


A comma or space separated list of contexts to exclude when generating the historypoint. See Using Coverage Contexts.



The directory where historical data is stored.



If true, all coverage attributed to a test that failed will be included.  (info) If history-point generation is taking a long time, you can speed up the performance of your tests by setting this value to 'true'.

No; defaults to "false"


The initstring of the coverage database.

No; if not specified here, Clover will look in 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 to the execution of this task.


If true, existing history point for the same date will be automatically overwritten.

No; defaults to "false".


If set, the name of the property to hold the absolute path name of the history point file that was created by this task.



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

No; default includes "all coverage data found".


Prevents excessive Clover data from being loaded when generating a history point. This should be used for large projects, where saving a full source level history point is taking a long time. (info) Clover's history reports currently do not use line level information. This means there is no loss of functionality when srcLevel="false". In the future however, line level information may be used.

No; defaults to "false"

Nested elements of <clover-historypoint>



<clover-historypoint> supports nested filesets which control which source files are to be included in a historypoint. Only classes which are from the source files in the fileset are included in the history point. This allows history points to focus on certain packages or particular classes. By using Ant's fileset selectors, more complicated selections are possible, such as the files which have recently changed, or files written by a particular author.



<testsources> is an Ant fileset that can be used to distinguish test source code from application source code. All files included in the fileset will be displayed in the separate 'Test' node of the coverage tree. If omitted, Clover's default test detection algorithm will be used to distinguish test sources.


<testresults> is an optional Ant fileset that defines the location of all test result XML files for your project. Currently, these will be used by <clover-historypoint> to determine coverage data if the includeFailedTestCoverage flag is set to false.

<testresults> 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'.


<clover-historypoint historyDir="clover-historical"/>

Records a history point into the directory PROJECT_DIR/clover-historical.

<clover-historypoint historyDir="clover-historical"

Records a history point, with the effective date of 24/07/01 12:08:56.

<clover-historypoint historydir="history"

Records a history point that excludes all test coverage that is attributed to a failed test; clover.historypoint.path will contain the absolute file path of the history point that was created.

<clover-historypoint historyDir="clover-historical">
	<testsources dir="src" include name="**/*"/>

Records a history point that recognizes classes in the "src" directory as tests.