9. Clover Target Reference

お困りですか?

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

コミュニティに質問

Clover provides a set of high level, preconfigured Ant targets. A target is a high-level, pre-configured set of functionality that you can use to quickly integrate Clover. They can be launched by adding them as values to Ant on the command line.

Each target contains a number of logically grouped lower-level pieces of functionality made up of Clover-specific Tasks and Types. These allow you to harness Clover's feature set, applying the concept of convention over configuration. This should help you avoid laboriously coding your own targets from scratch — allowing you to rapidly begin using Clover, no matter how complex your environment.

(info) To enable Ant targets in Clover, you need to firstly follow the Clover Quickstart Guide.

このページの内容:

Using a Target

Each Clover target typically has a name (and optional Ant properties) that can be used on the command line, as follows:

ant clover.all 

In the above example, we are running the clover.all target. This runs a 'clean' process, creates a build with Clover applied and then generates a Clover report.

with.clover (target)

Enables Clover on the current build. There are no properties for this target.

例:

ant with.clover

clover.all (target)

Runs clover.clean, with.clover, <test.target>, clover.report, clover.log (in that order) from a single target.

clover.all Properties:

プロパティ名

説明

オプション

Dependency

test.target

Defines the name of a custom target to run the tests.

inheritrefs (TRUE/FALSE)

clover.clean, with.clover

例:

ant clover.all -Dtest.target=run.tests

In the example above, we are specifying the test.target property. This is fed another value, ( shown as run.tests). Note that run.tests in this example could be replaced by the name of any custom target you may have created yourself in build.xml.

clover.clean (target)

Deletes the clover database and the clover.dest directory.
There are no properties for this target.

例:

ant clover.clean

clover.current (target)

Generates HTML and XML reports to clover.dest using project.title.

clover.current Properties:

プロパティ名

説明

オプション

Dependency

project.title

A string value, the user-specified name for this project

なし

なし

clover.dest

A system path, the destination directory for clover reports for this project

なし

なし

clover.span

A time interval defining the time span to use when creating historical reports

なし

なし

例:

ant clover.current -Dproject.title="MyProject"

clover.report (target)

This is the same as clover.current, i.e. it generates HTML and XML reports to clover.dest using project.title. Additionally, a history report will also be created using the historypoints in clover.project.historydir.

clover.report Properties:

プロパティ名

説明

オプション

Dependency

clover.historypoint.projectdir

A path location, where history points are stored.

なし

なし

clover.dest

A system path, the destination directory for clover reports for this project

なし

なし

clover.span

A time interval defining the time span to use when creating historical reports

なし

なし

例:

ant clover.report -Dclover.historypoint.projectdir="\myprojects\project3\history\"

clover.save-history (target)

Saves a history point to clover.project.historydir.

clover.save-history Properties:

プロパティ名

説明

オプション

Dependency

clover.project.historydir

A path location, where history points are stored.

なし

なし

test.target

Defines the name of a custom target to run the tests.

inheritrefs (TRUE/FALSE)

clover.clean, with.clover

clover.span

A time interval defining the time span to use when creating historical reports

なし

なし

例:

ant clover.save-history

clover.snapshot (target)

Saves a snapshot file to assist with Clover's Test Optimization feature. There are no properties for this target.

例:

ant clover.snapshot

clover.snapshot Properties:

プロパティ名

説明

オプション

Dependency

clover.snapshot.file

Defines the location of the snapshot file to use when saving optimized data. For use with Clover's Test Optimization feature.

なし

なし

clover.snapshot.file (target)

Defines the location of the snapshot file to use when saving optimized data. For use with Clover's Test Optimization feature.
Example:

ant clover.snapshot.file

Custom Targets

Clover targets can be modified or overwritten. You can also create your own targets by specifying targets with the same names in build.xml.

最終更新日 2014 年 8 月 6 日

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

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