2025-05-01
2025-05-01
This release enhances test generation, particularly for code performing object comparisons and handling Optional types. It also offers new controls for limiting the number of assertions per test and delivers compatibility updates.
Test Generation & Quality: Improved test generation for code which performs object comparisons and for
Optional
types, plus consistent annotation sorting.CLI Enhancements & User Control: New CLI options for setting assertion limits per test and listing all project modules.
Plugin Improvements: Improved plugin UX for test maintenance during class creation and refactoring.
Compatibility: Support for Gradle 8.14, JUnit Jupiter 5.12.2, and IntelliJ 2025.1.
Important Notices
Changes to test code
Test formatting: In a future release, Cover will switch the default test formatting style to
google-java-format
. This will cause a one-time churn, resulting in larger-than-usual diffs in your test code. If you prefer a different style, an alternative formatter configured in your build system will override this new default.
Deprecations
IntelliJ IDEA 2024.2: As of Cover 2025.05.01, IntelliJ IDEA 2024.2 is no longer supported. Cover requires IntelliJ IDEA 2024.3 or 2025.1.
Enhancements
Cover now supports Gradle 8.14. [Ref: TG-23102]
Cover now supports JUnit Jupiter 5.12.2. [Ref: TG-23080]
Plugin: Improved user experience of test maintenance features when creating or refactoring classes. [Ref: TG-22994]
Diffblue Cover now writes more effective tests for methods utilizing
Objects.equals(Object,Object)
. This improves test coverage for scenarios involving equality checks between objects. [Ref: TG-22948]CLI: Diffblue Cover now allows customization of the maximum number of assertions it includes in each generated test. This feature is accessible through the new
--max-assertions-per-test
option orDIFFBLUE_MAX_ASSERTIONS_PER_TEST
environment variable. [Ref: TG-22946]CLI: Diffblue Cover now enables listing all project modules when
dcover list-modules
is run. This is useful for managing multi-module operations, especially for restarting a cancelled process from a designated module. [Ref: TG-22838]CLI: Diffblue Cover now orders test class annotations alphabetically, which means annotation ordering is now always consistent. This change will cause one-time churn where annotations were previously not alphabetically sorted. [Ref: TG-22760]
Plugin: Cover now supports IntelliJ IDEA 2025.1 (Community and Ultimate editions). Support for 2024.2 has been removed. [Ref: TG-22575]
CLI & Plugin: Diffblue Cover now more accurately determines type arguments for Optional objects in user code. This leads to improved test quality, coverage, and reliability for methods handling Optional inputs. [Ref: TG-17587]
Resolved Issues
CLI & Plugin: Resolved an issue that, in some instances, caused Diffblue Cover to include unneeded
@MockBean
annotations andorg.mockito.Mock
imports in Spring tests. [Ref: TG-22932]CLI: Resolved an issue that caused Diffblue Cover to halt with an F009 error when a Jacoco destination variable was unresolved. The tool now attempts to utilize a default destination instead. [Ref: TG-22903]
CLI: Resolved an issue where Cover's validation process, for Gradle and JUnit 5 projects, could mistakenly delete whole test classes if a
@DisplayName
differed from the method name. Validation now accurately targets only the individual failing test. [Ref: TG-22784]CLI & Plugin: Resolved an issue affecting the discovery of
@InTestsUse..
. annotations (e.g.,@InTestsUseIntegers
) on Spring Controller methods. Tests produced by Cover will now reflect parameters defined in these annotations. [Ref: TG-22710]
Known Issues
Plugin: Cover incorrectly provides a menu option to write tests for a test file. [Ref: TG-17163]
Cover supports Open JDK and Oracle JDK; results with other JDKs may differ due to the variability in their implementations of Java. [Ref: TG-19345]
Reports: Cover only counts Java code towards the total line count metrics. Kotlin code is not currently included. [Ref: TG-22088]
Reports: Total lines of code metric can incorrectly count a multi-line comment at the end of a line of code, resulting in fewer than expected lines counted. [Ref: TG-22089]
Reports: Following an upgrade, the 'Total Lines of Code' card may show 0 until a new reports bundle has been uploaded. [Ref: TG-22094]
In some circumstances, Cover may write more simplistic tests with less meaningful assertions when Spring Boot dependency injection is disabled. [Ref: TG-22102]
In some circumstances, Cover will still write Spring Boot tests when Spring Boot dependency injection is disabled. [Ref: TG-22103]
Cover may write failing TestNG tests when Spring Boot dependency injection is disabled. [Ref: TG-22107]
Plugin: On some displays, the Test Review subsection title "Tests for review" can be malformed. [Ref: TG-22805]
Cover does not currently support Java 24. Please switch your JDK version to 21 or lower. [Ref: TG-22920]
Last updated
Was this helpful?