clover-historypoint

このページの内容

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

説明

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:

<clover-historypoint>
    <fileset/>
    <testsources/>
    <testresults/>
</clover-historypoint>

パラメーター

属性

説明

必須

日付

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.

filter

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

いいえ。

historyDir

The directory where historical data is stored.

はい。

includeFailedTestCoverage

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"

initstring

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.

overwrite

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

No; defaults to "false".

property

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

いいえ。

span

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".

srcLevel

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>

 

<fileset>

<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>

<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>

<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"
                      date="010724120856"
		    dateFormat="yyMMddHHmmss"/>

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

<clover-historypoint historydir="history"
                     filter="toString"
                     includeFailedTestCoverage="false"
                     property="clover.historypoint.path">
</clover-historypoint>

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="**/*Test.java"/>
</clover-historypoint>

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

最終更新日: 2017 年 1 月 14 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.