profiles

このページの内容

お困りですか?

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

コミュニティに質問

<profiles>

Since 3.1.11. Optional element. Defines a list of Clover profiles, which can be selected at runtime by providing a clover.profile=<name> system property. Thanks to this you can change some of Clover's behavior without code recompilation.

<profiles>
  <profile name="default" coverageRecorder="FIXED|GROWABLE|SHARED">
    <distributedCoverage/> <!-- optional -->
  </profile>
  <profile .../>
  <!-- more profiles -->
</profile>

 

<profile>

Since 3.1.11. Contains a definition of a single runtime profile.

パラメーター

属性

説明

必須

name

The name for this profile; name must be unique among profiles. There must be one profile named "default".

No. Defaults to "default".

coverageRecorder

Type of coverage recorder which will be used for gathering coverage data at runtime. Possible values: FIXED, GROWABLE, SHARED (case insensitive).

(warning) Warning: we strongly recommend using the default setting. Do not change until you deeply understand how it works.

No. Defaults to "FIXED".

ネスト要素

<distributedCoverage/>

(lightbulb)Note: a definition in <profile>/<distributedCoverage> element has priority over the <clover-setup|clover-instr>/<distributedCoverage> element.

Selecting clover.profile at runtime

Clover profile is being selected at runtime using the following algorithm:

  • Are there any profiles defined in compiled code?
    • yes -
      • 1. read the clover.profile system property. is it defined?
        • yes - use the value as profile name
        • no - use the "default" profile name
      • 2. is the profile name found on list of defined profiles?
        • yes - use settings from this profile
        • no - use system settings (default coverage recorder etc...)
    • no - use system settings (default coverage recorder etc...)

So it fall-backs to default system settings in case of missing profile.

 

最終更新日 2016 年 5 月 26 日

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

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