Clover-for-Grails supports the configuration options outlined in the code sample below. All of these configuration options are defined in a single clover {} code block, which itself is defined within the Groovy build configuration file (BuildConfig.groovy) of your Grails project.

The BuildConfig.groovy file is located in the grails-app/conf subdirectory of your Grails project's root directory.

clover {

 on = true|false // a boolean value indicating whether or not clover is enabled

 optimize = true|false // whether test optimization is enabled 
                       // (by setting optimize=true there's not need to set on=true)

 license.path = "/path/to/clover.license" // the location of the clover license file,
                                          // if not in one of the default locations; deprecated

 debug = true|false    // a boolean to toggle debugging on or off

 verbose = true|false  // a boolean to toggle verbose output on or off; can be overridden by debug=true; since 3.1.6

 initstring = "" // the location to use for Clover to write out its database

 instrumentLambda = "none|expression|block|all_but_reference|all" // whether to instrument Java 8 lambda functions, 
                         // see the <clover-setup> Ant task for more details

 forceClean = true|false  // whether to clean build directory (to force compilation of classes with Clover),
                         // true by default

 srcDirs = []  // an array of Strings of source directories to including in instrumentation

 includes = [] // an array of String Ant Glob Patterns to include for instrumentation

 excludes = [] // an array of String Ant Glob Patterns to exclude for instrumentation

 setuptask = {} // Gant script to be called instead of the default clover-setup

 reporttask = {} // Gant script to be called when tests have finished

 historypointtask = {} // Gant script to be called when clover history point has to be created

 reportStyle = "adg|classic"  // style of the report - since Clover 4.0

 json = true|false   // a boolean to enable generation of json output in report; used if custom 'reporttask' script is not defined

 title = ""    // a report title

 view = true|false   // launch generated report in a web browser


Hint: you can also pass these values from a command line, e.g. "grails test-app -clover.on". However, on Windows platform, all "-key=value" pairs must be put in double quotes (otherwise they will be parsed incorrectly by Grails - it's a Grails "feature").


More details for: