Clover 3.3 Release Notes

2014 年 3 月 31 日

We are happy to announce Clover 3.3.

Clover 3.3 adds support for the Spock framework and JUnit4's parameterized tests.

Upgrading to Clover 3.3 is free for all customers with active Clover software maintenance at the date of launch and of subsequent updates.

Highlights of Clover 3.3:

 

 

Changes in Clover 3.3.x bug-fix versions

This page describes new features of Clover 3.3. For changes in 3.3.x bug-fix releases, please refer to the relevant documentation:

Highlights of Clover 3.3

Spock framework support

The Spock framework is one of the best unit testing frameworks compatible with JUnit and based on the Groovy language. You can write beautiful yet powerful tests, including but not limited to: data series, mocking, behavior testing and detailed reporting about
failed assertions.

Automatic detection of Spock's Specifications

Clover 3.3 comes with a new test detector, which handles Spock's Specifications. It means that you will see Specifications on the "Tests" tab and you will no longer have to configure a custom test pattern to treat them as test code.

Handling static test names as declared in the code

In the Spock framework tests are defined using a descriptive caption, such as: def "this is my test" { ... }
Under the hood, Spock transforms such code into methods named like “$spock_feature_n_m”. Clover 3.3 handles these statically-
defined names, so you can see them on a method list.
Screen shot: Clover displays descriptive test name instead of the cryptic "$spock_feature_n_m".

Handling runtime test names and the @Unroll annotation

The Spock framework allows to define a data series and to run the same test multiple times using different inputs. But how to detect which iteration has failed among hundreds of test iterations which were run? The Spock comes with a solution – the @Unroll annotation appends a sequence number to a test name. Furthermore, you can define variables or even use Groovy selectors in it. For instance:
def "minimum of #a and #b is #c"() { ... }
def "#person.name is a #sex.toLowerCase() person"() { ... }
Clover 3.3 tightly integrates with Spock’s test runner so that in the HTML report you can see test names exactly as they were evaluated by Spock.
Screen shot: Clover 3.3 knows test names at runtime as evaluated by Spock for each test iteration.

JUnit4 parameterized tests support

Similarly to the Spock support, Clover 3.3 can record runtime test names for JUnit4 test classes annotated with @Parameterized annotation. This integration is not automatic, however. See the Integrating Clover with JUnit4 Parameterized Tests and Running JUnit4 Parameterized tests with Surefirearticles.

New toggle in report wizards in Eclipse and IDEA

The 'Show lambda functions' toggle allows to show Java 8 lambda functions in HTML and XML reports.


Note that other Clover integrations (such as with Ant, Maven or Grails) have this feature available since Clover 3.2, but it has to be configured using different options (showLambdaFunctions and showInnerFunctions).

Upgrading from Clover 3.2 to Clover 3.3

Clover 3.3 is backward-compatible with Clover 3.2. When upgrading, you may need to delete existing Clover database files due to changes in the database format. In most typical environment configurations it will be done automatically (for instance, by Maven's clean goal).

最終更新日 2016 年 5 月 26 日

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

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