2013 年 10 月 21 日
We are happy to announce Clover 3.2.Clover 3.2 adds support for Java 1.8 language constructs, including instrumentation of lambda expressions and virtual extension methods (the "default" methods) in interfaces. New language constructs can be shown in HTML, XML, PDF or JSON report.
Upgrading to Clover 3.2 is free for all customers with active Clover software maintenance at the date of launch and of subsequent updates.
Clover 3.2 now provides support for the Java 1.8 language features such as lambda functions, method references, virtual extension methods or repeating annotations. It is possible to instrument lambda functions and method references and measure code coverage for them. It is also possible to see lambda functions in HTML and XML reports as well as in a source code editor window in the IntelliJ IDEA (version 12 or later). Code metrics (such as number of statements, number of methods, cyclomatic complexity etc) also take into account lambda expressions.
In Clover 3.2 you can see lambda functions declared in a method body or as a class field in HTML report as well as see a lambda function signature in a <line> tag in XML report. Just use <clover-report> task with showLambdaFunctions=true and showInnerFunctions=true options.
Screen shot: an HTML report with lambda functions declared inside methods (showLambdaFunctions=true and showInnerFunctions=true):
Screen shot: a dashboard showing a lambda function in the "Least Tested Methods" section (showLambdaFunctions=true):
Screen shot: code coverage highlighting and tool-tip markers for lambda functions in IntelliJ IDEA 12
Clover 3.2 comes with an extended Clover API (and even more will come in next minor releases). It allows to navigate more easily through the Clover database structure. See https://docs.atlassian.com/atlassian-clover/latest JavaDoc documentation.
Due to fact that Eclipse 3.6 is the lowest Eclipse version officially tested on JDK1.5, we decided to drop support for older Eclipse versions. Clover 3.2 may still work on them, but it is not guaranteed.
The latest Eclipse and RAD versions available at the date of the Clover 3.2 release are supported.
Please note that Eclipse 4.3 does not support Java 8 yet - the most probably it will be available in Eclipse 4.4.
Clover 3.2.0 does no longer support the Ant 1.6.x officially. It may still work with Ant 1.6.x, but it is not guaranteed.
Clover 3.2 is generally backward-compatible with Clover 3.1, and the migration should be straightforward.
However, there are few issues breaking the backward compatibility:
Deprecated command line options -jdk14, -jdk15 and -jdk17 have been removed. Use the --source=1.x instead of this.
Deprecated command line option -nu/--nounique has been removed. Use --showunique/-su in order to see unique per-test coverage in the report. Deprecated option -r/--resultsdir has been removed.
The --outputfile option was renamed to --outfile to make it consistent with the XMLReporter.
4) Clover classes were renamed from com.cenqua.* to com.atlassian.*.
It affects all classes in Clover core (com.cenqua.clover:clover). This class rename should be transparent to build scripts (Ant / Maven / Grails) unless your build scripts or tools are referencing these classes directly. In such case rename references as follows:
SnapshotPrinter - from com.cenqua.clover.test.optimization.SnapshotPrinter to com.atlassian.clover.optimization.SnapshotPrinter.