31 March 2010
Clover 3.0 is a major release which adds Groovy support for Ant, Maven 2 and Grails. We also offer the new Clover-for-Grails plugin that allows you to use Clover's code coverage capabilities directly inside your Grails project. Furthermore, we add a new per-test coverage viewer and completely new dashboard view to Eclipse.
Upgrading to Clover 3.0 is free for all customers with active Clover software maintenance at the date of launch.
Clover 2.6 can be downloaded from the Clover Download Centre. Before upgrading, please refer to the relevant documentation:
Clover 3.0 Ant and Maven 2 plugins now provide support for Groovy. Most Clover-for-Ant tasks will now work on Groovy code and the Clover-for-Maven 2 plugin now supports Groovy code compilation and report generation.
Read more: Clover-for-Ant Upgrade Guide and Upgrade Notes for Clover-for-Maven 2 and 3 Groovy Integration.
Unless otherwise indicated, all tasks described in the Clover-for-Ant User's Guide work with Groovy code.
Clover's reporting features support Groovy code, which includes per-test coverage and other reporting features available in Ant and Maven 2.
Furthermore:
Screenshot: Clover Groovy Code Coverage
Screenshot: Clover Filtering Specified Groovy Methods
Clover 3.0 now incorporates a new plugin for the Grails web application development framework. Grails project developers can now test their Groovy code using Clover to generate coverage reports.
The Clover-for-Grails plugin is very easy to install and upgrade, with multiple installation options that can be issued from a single Grails command. Upgrading is as easy as reinstalling the Clover-for-Grails plugin.
You can configure the Clover-for-Grails plugin on the command line or by including Clover-for-Ant-based (Gant) instructions directly inside the BuildConfig.groovy
file.
Read more: Clover-for-Grails, Clover-for-Grails Installation and Upgrade Guide
Screenshot: Clover Report Dashboard of a Grails Project
The Clover-for-Eclipse plugin includes a new inline per-test coverage viewer. Hovering over the gutter now displays a pop-up with a list of tests that hit that line. Clicking on a test will take you directly to the test source code.
Screenshot: New Clover-for-Eclipse per-test coverage pop-up
For the first time, the Clover Report Dashboard is now available in Eclipse!
The existing 'Money Demo' tutorial (located in CLOVER_HOME/tutorial
) has been updated with additional Groovy code for Ant and Maven 2. The Ant (build_completed.xml
) and Maven 2 (pom_completed.xml
) tutorial solution files contain examples of Groovy integration.
For Ant builds, your Groovy code will automatically be compiled if the GROOVY_HOME
environment variable has been set and points to the location of your Groovy directory.
Read more: Tutorial - Using Clover with Ant and JUnit
The clover2:check task now has two new parameters: methodPercentage
and conditionalPercentage
. These parameters allow you to set target percentages that define when to fail the build for methods and conditions, respectively.
Be aware that these will only be used if maven.clover.targetPercentage
has been set.
For more information, please refer to the Clover-for-Maven 2 and 3 User's Guide.
The Clover XML report now includes test results and Clover ships with an XML schema (XSD) for these reports.
See the changelog for details.