2023-07-02
This release adds support for the TestNG testing framework and updates support for the Mockito mocking framework by adding support for Mockito 5. See the full Release Notes below for details of all enhancements and resolved issues covered by this release.
Enhancements
Writing tests for Spring 6 entities and components is included in this release. Tests for spring controllers, repositories and validators will be available in a future release. [Ref: TG-19624]
Cover: Diffblue Cover now supports Gradle projects using the Kotlin DSL (i.e.
build.gradle.kts
). [Ref: TG-19460]Cover: Diffblue Cover now writes tests which use both empty and non-empty Collections for inputs when possible. [Ref: TG-19399]
Cover: Diffblue Cover now supports TestNG. Note that for Spring 4 projects that use TestNG and Mockito, the Mockito version must be below 2.7.0. Support for TestNG with Mockito >= 2.7.0, Spring 5 or Spring 6 is due in future releases. [Ref: TG-19329]
CLI: Diffblue Cover CLI now has a
--mock-construction
option to mock constructors of the given classes in tests. [Ref: TG-18763]Cover: Diffblue Cover now supports mocking with the latest version of Mockito (Mockito 5). [Ref: TG-18613]
Resolved Issues
CLI: Updated
--coverage-reports
environment checks toWARN
and continue instead ofERROR
when JaCoCo encounters an issue. [Ref: TG-19457]Cover: Resolved an issue such that mocks are now disabled if Mockito can't be initialized. [Ref: TG-19401]
Known Issues
Cover may produce tests for JUnit 4.10 and lower that do not compile due to the use of
assertNotEquals
. [Ref: TG-17605]IntelliJ Plugin: Upgrading to IntelliJ IDEA 2022.3 may, in some circumstances, cause existing run configurations to no longer produce tests. Removing any run configurations for that entity and writing tests again will recreate a working run configuration [Ref: TG-18282]
Cover may encounter an
F009: Internal error
while writing tests using Mockito 5. To avoid this issue use a version of Mockito earlier than 5. [Ref: TG-19610]Cover may, in some circumstances, write tests which provoke
W002: Test compiled, but did not pass
, while using TestNG with Spring 4. [Ref: TG-19619]Cover reports
Command could not be completed due to an unexpected error: java.lang.AssertionError: expected value for fact SELECTED_BUILD_SYSTEM.
while using an unsupported Java version. To avoid this issue, use a supported version of Java 8, 11 or 17. [Ref: TG-19623]
Last updated