2025-04-02

2025-04-02

This release focuses on enhanced test generation for Spring Data JPA, improved object instantiation during test creation, and fixes to test addition & processing.

  • Test Generation & Support: Test generation now supports Spring Data JPA repository interfaces utilizing composite primary keys (via @IdClass and @EmbeddedId annotations).

  • Object Instantiation: Factory methods found in the test classpath are prioritized during object instantiation, leading to more accurate and reliable tests.

  • Resolved Issues: An issue where existing tests were incorrectly removed during additions has been resolved (affecting static method access with different Mockito styles). Processing efficiency is improved by avoiding unnecessary testing of auto-generated code from Protobuf, gRPC, and Lombok.

  • Compatibility: JUnit Jupiter 5.12.1 is now supported.

Important Notices

Deprecations

  • IntelliJ IDEA 2024.2: Cover 2025.04.02 is the final release supporting IntelliJ IDEA 2024.2. Subsequent Cover releases (starting from version 2025.05.01) will require IntelliJ IDEA 2024.3 or 2025.1.

Enhancements

  • CLI & Plugin: Cover now recognizes composite keys in repository code, supporting both @IdClass and @EmbeddedId annotations. This enables test generation for Spring Data JPA repository interfaces utilizing composite primary keys. [Ref: TG-22983]

  • CLI & Plugin: Diffblue Cover now provides improved support for java.util.Map methods like putIfAbsent, putAll, and compute. This enables the generation of more tests for methods utilizing these specific map operations. [Ref: TG-22856]

  • Cover now supports JUnit Jupiter 5.12.1 [Ref: TG-22750]

  • CLI & Plugin: Cover now prioritizes factory methods found in the test classpath when creating new objects for tests. Factory methods in the main classpath can still be used but have lower priority. [Ref: TG-22214]

Resolved Issues

  • CLI & Plugin: Resolved an issue where Cover may incorrectly remove existing tests when adding new ones. This occurred when tests accessed static methods using different Mockito import styles. [Ref: TG-22693]

  • CLI & Plugin: Resolved an issue where Cover would unnecessarily attempt to test auto-generated code written by Protobuf, gRPC, and Lombok. This prevents unnecessary processing and improves the efficiency of test generation. [Ref: TG-22388]

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]

  • When using Gradle, Junit 5 tests produced with the @DisplayName annotation may cause all the Diffblue tests to be removed from the class in validation [Ref: TG-22784]

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