2026-02-01

This release introduces a new merge mode (--merge) that integrates generated tests directly into existing test files, and adds support for Spring 7 and Spring Boot 4.


New Merge Mode

  • Direct Test Integration: Diffblue Cover now supports merge mode (--merge), which integrates generated tests directly into existing *Test.java files instead of creating separate *DiffblueTest files. The @WriteTestsTo annotation allows for customizing test placement for specific classes. For more information, see the Merge Mode documentationarrow-up-right.

Spring Framework Support

  • Spring 7 & Boot 4: Diffblue Cover now supports Spring 7 and Spring Boot 4, enabling test generation for projects using the latest Spring framework versions.


Important Notices

Upcoming: Checkstyle Compatibility in Merge Mode

In merge mode, checkstyle errors can occur if your project uses a formatter other than google-java-format. In an upcoming release, Cover will detect incompatible checkstyle configurations during environment checks and provide options to specify your project's formatter.

Enhancements

  • Diffblue Cover now supports merge mode (--merge), which integrates generated tests directly into existing *Test.java files instead of creating separate *DiffblueTest files. Use the @WriteTestsTo annotation to customize test placement for specific classes. [Ref: TG-24165] Docsarrow-up-right

  • CLI: Diffblue Cover now consolidates R090 output codes into a single message listing all affected classes, making merge failures easier to diagnose and resolve. [Ref: TG-24164]

  • Diffblue Cover now validates that cover-annotations version 1.4.0 or higher is available when using merge mode, providing clear guidance if the dependency is missing or outdated. [Ref: TG-24163]

  • Diffblue Cover now supports Spring 7 and Spring Boot 4, enabling test generation for projects using the latest Spring framework versions. [Ref: TG-24162]

  • Resolved an issue where Diffblue Cover would fail to parse Jacoco format configuration when pom.xml used nested <format> elements instead of comma-separated strings. [Ref: TG-24160]

Resolved Issues

  • Resolved an issue where dcover issues would show accumulated output codes from previous modules when running on multi-module Maven projects. [Ref: TG-24161]

Known Issues

  • Plugin: Diffblue Cover incorrectly displays a menu option to write tests for existing test files. [Ref: TG-17163]

  • Using JDKs other than the supported Open JDK and Oracle JDK may produce unexpected results due to implementation differences. [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. The recommended workaround is to downgrade to Mockito 4.x. [Ref: TG-19610]

  • Reports: The total line count metric in Reports only includes Java code. Kotlin code is not 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]

  • 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' is malformed. [Ref: TG-22805]

  • When test formatting settings are changed, the Test Review feature may incorrectly remove the @ManagedByDiffblue annotation from tests, particularly in cases involving static import formatting changes. [Ref: TG-23750]

  • Plugin: Using the Test Review feature may create tests that have incompatible dependency injection systems. [Ref: TG-23935]

  • CLI: In rare circumstances, Cover may remove existing tests when using merge mode (--merge). The recommended workaround is to use the @WriteTestsTo annotation to specify a separate test class. [Ref: TG-24166]

Last updated

Was this helpful?