2025-07-02

This release focuses on improving test quality, command-line interface (CLI) functionality, and overall stability. Key enhancements include cleaner test generation that adheres to coding standards, more robust and configurable CLI options, plus performance and dependency-handling improvements.

  • Enhanced Test Quality & Readability

    • Cleaner Mock Assertions: Generated tests now feature simplified Mockito verify() calls, avoiding redundant eq() matchers to improve readability and prevent SonarQube code smells.

    • Improved Static Field Assertions: Assertions for static fields now consistently use direct static access (e.g., MyClass.MY_FIELD), ensuring generated tests follow recommended Java coding standards.

  • Improved CLI Functionality & Stability

    • Expanded Argument File Support: All CLI commands now support .args files, and a common.args file can be used to specify arguments that apply across all commands for simpler configuration.

    • Robust Classpath Validation: The CLI now validates each classpath entry, allowing test generation to proceed successfully even if some entries are invalid.

    • Resolved Dependency Conflicts: An issue with Jackson library conflicts that could cause build failures in Maven, Gradle, and Ant has been resolved, improving stability and support for older environments.

  • Performance & Usability

    • Improved Performance: Cover now runs faster and uses less memory by optimizing its analysis process. This may result in small changes to generated tests without impacting overall code coverage.

Important Notices

Deprecations

  • Deprecation of support for JUnit 5.0-5.2 in the IntelliJ Plugin: With this release (2025.07.02), support for JUnit versions 5.2 and below is deprecated and will be removed in the next release (2025.08.01). To ensure continued compatibility, users must upgrade projects using JUnit 5.0.x, 5.1.x, or 5.2.x to version 5.3.0 or higher. This change does not affect projects using JUnit 4 or TestNG, nor does it impact the Diffblue Cover CLI.

Enhancements

  • Diffblue Cover now consistently generates assertions for static fields using direct static access (e.g., MyClass.MY_FIELD) instead of instance access. This ensures generated tests adhere to recommended Java coding standards. [Ref: TG-23533]

  • Diffblue Cover now operates with improved efficiency in memory and speed by optimizing its analysis process. This may result in minor changes to generated tests without reducing overall code coverage. [Ref: TG-23492]

  • Diffblue Cover now generates cleaner, more readable tests by simplifying Mockito verify() calls. This avoids redundant eq() matchers, improving maintainability and preventing SonarQube code smell warnings. [Ref: TG-23329]

  • CLI: Diffblue Cover now extends support for argument files (.args) to all CLI commands. Additionally, a common.args file can now be used to specify arguments that apply to all commands, simplifying configuration. [Ref: TG-23036] Docs

Resolved Issues

  • CLI: Resolved an issue where invalid entries in the classpath, such as non-JAR files, could cause test generation to fail. Diffblue Cover now validates each classpath entry, ensuring only valid JAR files and directories are used. [Ref: TG-23506]

  • CLI: Resolved an issue where dependency conflicts with the Jackson library could cause build failures in Maven, Gradle, and Ant projects. Diffblue Cover now shades this dependency, improving stability and enabling support for older environments like Gradle 6.8.3. [Ref: TG-23272]

  • Plugin: Resolved an issue where Diffblue Cover would fail to parse the @MethodUnderTest annotation if its value was split across multiple lines by code formatters. This ensures tests with formatted annotations are correctly recognized in the IntelliJ plugin. [Ref: TG-23168]

Known Issues

  • Plugin: Diffblue Cover incorrectly displays a menu option to write tests for existing test files. [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]

  • Cover may encounter an F009 (Internal error) caused by a ClassCircularityError involving org/mockito/configuration/MockitoConfiguration when writing tests with Mockito 5. To avoid this, use an earlier version of Mockito. Downgrading to Mockito 4.x is the recommended workaround. [Ref: TG-19610]

  • 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]

  • Diffblue Cover does not currently support test creation for projects using Java 24; please use JDK 21 or lower. [Ref: TG-22920]

Last updated

Was this helpful?