2023-07-03
This release adds support for IntelliJ IDEA 2023.2, Spring Core 6, Spring Boot 3, Java 17 Records and relaxes restrictions when sandboxing is disabled. See the full Release Notes below for details of all enhancements and resolved issues covered by this release.
Getting more tests by configuring Diffblue Sandboxing
Diffblue Cover writes human-like unit tests by running your code thousands of times as it searches for the best tests that achieve maximum coverage and regression detection. By default, your code is run inside a sandbox which blocks calls with potentially disruptive side-effects such as network, file system or system changes. However, this can also limit the number of tests Diffblue can write. Disabling the sandbox will allow Cover to run all of your code regardless of side-effects thus maximising coverage. Disabling sandboxing must be done with caution as your code may behave in ways you do not expect (e.g. file system modifications). In this release the disable sandboxing option has been extended. If you want to disable sandboxing, we suggest you read this article.
Enhancements
Cover: Diffblue Cover Refactor now only applies code styling to the methods added by Cover. [Ref: TG-19572]
Cover: Diffblue Cover now supports TestNG with Mockito >=
2.7.0
. [Ref: TG-19525]Cover: Disabling Diffblue Cover's sandboxing is now more permissive, allowing tests to be written using
sun.misc.Unsafe
(andsun.misc.*
), JMX (Java Management Extensions) and writing to arbitrary files. [Ref: TG-19476]Cover: Diffblue Cover now provides more granular output codes and messaging to help resolve issues with licenses. [Ref: TG-19463]
Cover: Diffblue Cover now supports writing tests for Spring 6 controllers, validators and repositories, in addition to entities and components. [Ref: TG-19368]
Cover: Diffblue Cover CLI can now add missing project dependencies, automatically, by using
dcover fix-build
after runningdcover create --preflight
. [Ref: TG-19317]IntelliJ Plugin: Cover now supports IntelliJ IDEA Community Edition 2023.2 and IntelliJ IDEA Ultimate 2023.2. [Ref: TG-19196]
Cover: Diffblue Cover now uses the canonical constructor for inputs that are records. [Ref: TG-18142]
Cover: Diffblue Cover can now write tests for methods which use Java 17 Records. [Ref: TG-17133]
Resolved Issues
Cover: Resolved an issue which caused Cover to report
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. [Ref: TG-19623]Reports: Resolved an issue which caused Cover to, in some circumstances, misreport method information in classes that extend or implement generic types. [Ref: TG-19539]
Plugin: Resolved an issue which caused Cover to not provide a meaningful error message when a time-limited build has expired. [Ref: TG-19516]
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: Diffblue 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
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]
Last updated