This is the documentation for Clover 3.3. View this page for the

Unknown macro: {spacejump}

of Clover, or visit the latest Clover documentation.

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

 

  • ラベルなし