JVM properties

This page contains list of JVM properties, which can be passed during compilation, runtime or reporting in order to modify Clover's behavior.

Scope Name Description Examples
compilation

clover.includes

Ant PatternSet of files to be instrumented by Clover. This property is for compilation. Using <files> or <fileset> in <clover-setup> overrides this property.

-Dclover.includes=**/*.java

(for compilation)

compilation clover.excludes Ant PatternSet of files to be not instrumented by Clover. This property is for compilation. Using <files> or <fileset> in <clover-setup> overrides this property.

-Dclover.excludes=**/internal/*.java

(for compilation)

compilation clover.grover.ast.dump For debugging only. Whether to dump an abstract syntax tree (AST) for Groovy code instrumented by Clover. Default is false.  

compilation

reporting

clover.license.cert Clover's license key. Required for compilation and reporting. -Dclover.license.cert="license key
remember to preserve
newline characters"

compilation

reporting

clover.license.path Path to a file containing Clover's license key. Required for compilation and reporting. -Dclover.license.path=clover.license
reporting clover.skipTreeMap Whether to skip generation of the Tree Map diagram in HTML report. Disabling tree map generation may speed up report generation for large projects. Default is false.  -Dclover.skipTreeMap=true
runtime clover.enable Whether Clover coverage recording shall be enabled at runtime. Possible values: true/false. Default is true. It's useful in case when you have deployed an instrumented code, but you don't want to measure code coverage. -Dclover.enable=false
runtime clover.initstring Path to Clover database, overrides the path set during compilation. It's useful when you run your tests on a different machine. You can use "${abc}" variables in the path, which will be resolved against runtime properties. -Dclover.initstring=/tmp/${app.name}/clover.db
runtime clover.initstring.basedir Base directory for relative paths to Clover databases; it overrides paths which were set during compilation. It's useful when you have many clover.db files for your application and you run tests on a different machine. You can use "${abc}" variables in the path, which will be resolved against runtime properties. -Dclover.initstring.basedir=/path/to/clover/base/dir
runtime clover.initstring.prefix Prefix which has to be added to a file name of every Clover database. Should be used only with relative paths in initstring. You can use "${abc}" variables in the prefix, which will be resolved against runtime properties.

-Dclover.initstring.prefix=abc

runtime clover.logging.level Logging level to be used at runtime. Possible values: debug, verbose, info, warn, error. Setting debug or verbose may be helpful to investigate why coverage recording files are not produced. -Dclover.logging.level=debug
runtime clover.logging.adapter Name of the Log4J logging adapter which shall be used. Possible values: log4j, jdk, stderr or a fully qualified class name of the logger. If not set, then Clover's logger is used. -Dclover.logging.adapter=log4j
runtime clover.profile Name of the instrumentation profile which has to be selected at runtime. Can be undefined. See <clover-setup> for more details about profiles. -Dclover.profile=default
runtime clover.flush.everytest Whether every test end should trigger flushing of global coverage data to disk (in addition to per-test coverage data). Possible values: true/false. Default is false. -Dclover.flush.everytest=true
runtime clover.synchronous.io Whether to use synchronous I/O when writing coverage recording files. Possible values: true/false. Default is false. When set to true, the 

FileDescriptor.sync() will be called after call FileOutputStream.flush().

-Dclover.synchronous.io=true
runtime clover.rle.coverage Whether to use RLE compression for coverage recording files. Possible values: true/false. Default is true. -Dclover.rle.coverage=false
runtime clover.pertest.coverage Which kind of per-test recorder shall be used. Possible values: off, diff or (undefined). Default is undefined. If value is undefined, then value of the clover.pertest.coverage.threading is used. May be useful for very large projects (millions of LOC, thousands of tests). More details here.

-Dclover.pertest.coverage=off

disables per-test coverage

runtime clover.pertest.coverage.threading Which kind of per-test recorder shall be used for tests running in parallel. Possible values: volatile, synchronized or (undefined). Default is undefined. If undefined, then it's assumed that tests are ran sequentially. More details here. -Dclover.pertest.coverage.threading=volatile
runtime clover.optimization.enabled Whether to run test optimization in Ant's <junit> task. Possible values: true/false. -Dclover.optimization.enabled=false
runtime clover.server Whether to start Clover Server thread (shall be set for a JVM which runs tests). Default is false. See Using Distributed Per-test Coverage. -Dclover.server=true
runtime clover.distributed.coverage Whether to enable or disable distributed coverage feature. Also can be used to fine-tune options. Format: "on|off|key=value;key=value...". Default is off. See Using Distributed Per-test Coverage.

-Dclover.distributed.coverage=on

-Dclover.distributed.coverage=host=my.host.com;numclients=2;timeout=10000

Last modified on Nov 21, 2014

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.