2024-10-02
This release enhances the quality of assertions in unit tests written by Cover, improving both readability and overall test quality. Descriptive Test Naming is now enabled by default. Full details of these updates can be found in the release notes below.
Important Notices
Descriptive Test Naming: Cover now, by default, writes tests which use descriptive Given-When-Then-style names. For more details on Descriptive Test Naming, please refer to the IntelliJ Plugin documentation or the Cover CLI documentation.
Changes to test code: With Descriptive Test Naming enabled by default, and improved grouping of related tests, updating to this version is likely to cause a larger than usual diff in your test code.
Enhancements
Cover now supports Junit Jupiter 5.11.2 [Ref: TG-22109]
CLI: Cover now outputs the default Maven or Gradle configuration to
DiffblueBuild.yaml
by runningdcover build-default-config --maven
ordcover build-default-config --gradle
. [Ref: TG-22095]Cover: Improved
String
andchar
input descriptions for test method names and Javadoc. [Ref: TG-22083]Cover CLI & Plugin: Descriptive Test Naming is now enabled by default. Descriptive Test Naming can be disabled via the plugin settings or by using the
--no-descriptive-test-names
CLI option. [Ref: TG-22014]Improved Cover's ability to obtain objects using builders, specifically
feign.Response
objects withfeign.Response.Builder
, leading to better test coverage. [Ref: TG-22010]Cover now selects the most relevant assertions by comparing all tests written for a method under test. [Ref: TG-21627]
Cover now avoids writing tests which pass null values into
@Nonnull
annotated method parameters. [Ref: TG-21387]Plugin: Cover's test creation settings can now be reset to default via the 'Restore Defaults' button in the plugin settings panel. [Ref: TG-20577]
Resolved Issues
Resolved an issue which caused Cover to report
DETECTED_LIBRARY_VERSIONS: SemverException: Invalid version
, during environment checks, also causing subsequent environment checks to fail. [Ref: TG-22140]Reports: Resolved an issue which caused Cover to show empty coverage bars for multi-module projects in the project table. [Ref: TG-22072]
Resolved an issue which caused Cover to inconsistently identify tests targeting the same method(s). Cover now has improved grouping of related tests. [Ref: TG-21989]
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]
Cover may encounter an
F009: Internal error
while writing tests using Mockito 5. To avoid this issue use an earlier version of Mockito. [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]
Last updated