What's New > Version 2021.03.03
Increased coverage and additional user guidance
Release date: Mar 29, 2021
Enhancements include increased coverage and additional user guidance
This release contains a number of enhancements, including increased coverage and additional guidance for new users including:
- The ability to populate deep nested objects when covering chains of getter calls
- Adding the Spring
@DirtiesContext
annotation when the test uses setters of the class under test - Now writing tests that provide coverage for anonymous and local classes
- Producing more appropriate inputs for
Object
,List
andMap
arguments - Treating any controller parameter annotated with
@RequestBody
as a POJO, on which setters can be called.
For details, please see the Full Release Notes.
Diffblue Cover Community Edition now available for use with commercial code
We’ve updated our End-User License Agreement to open up Community Edition for writing tests for both open source and commercial code. This means you can now use Diffblue Cover Community Edition at work completely for free.
Many organisations may have restrictions against using free software or need additional protection. Visit our documentation to learn more about how you can use Diffblue Cover at work.
Feedback
If you have feedback, questions or requests regarding the Diffblue Cover IntelliJ Plugin, please contact us on the Community Forum. We would love to hear about what is important to you and what you would like to see in upcoming releases.
How do I automatically maintain all of these tests?
Use Diffblue Cover on any CI platform to automatically update your unit tests and catch regressions for every commit - watch this video to learn more.
Full Release Notes
Enhancements
-
Cover is now able to populate deep nested objects when covering chains of getter calls. [Ref: TG-13919]
-
Cover now adds the Spring
@DirtiesContext
annotation when the test uses setters of the class under test. [Ref: TG-13917] -
Cover now treats any controller parameter annotated with
@RequestBody
as a POJO, on which setters can be called. [Ref: TG-13909] -
Cover now writes tests that provide coverage for anonymous and local classes. [Ref: TG-13837]
-
Cover now produces more appropriate inputs for
Object
,List
andMap
arguments. [Ref: TG-13693] -
CLI: Cover now provides an improved error message and guidance when provided entry point prefixes do not match any method. [Ref: TG-14005]
-
CLI: Cover is now able to increase coverage for methods which return ENUMs by specifying the
--enable-value-coverage
option. [Ref: TG-14001] -
CLI: Cover is now able to increase coverage for methods which accept ENUMs by specifying the
--enable-value-coverage
option. [Ref: TG-14000] -
CLI: Cover now performs early checks to identify if the project being analyzed has been built before attempting to write tests. [Ref: TG-13978]
-
IntelliJ Plugin: Cover now shows usage guidance to help new users get started. [Ref: TG-13980]
-
IntelliJ Plugin: Cover now allows tests to be written by selecting the ‘Write Tests’ option in IntelliJ’s ‘Diffblue’ menu. [Ref: TG-13958]
Resolved Issues
-
Resolved an issue which prevented Cover from writing tests for Spring classes with
@Autowired
Maps
,Sets
, andLists
. [Ref: TG-13838] -
Resolved an issue where the project-under-test’s logging may interfere with Cover’s logging. [Ref: TG-13357]
-
CLI: Resolved an issue where Cover would fail to write tests when the Spring application spawns a new process. [Ref: TG-14057]
-
CLI: Resolved an issue where
Profiles
defined in test resources of Spring Gradle projects was not considered when using the--active-profiles
option. [Ref: TG-13937] -
CLI: Resolved an issue where Cover’s environmental checks may fail due to file permissions on Windows. [Ref: TG-13786]
-
IntelliJ Plugin: Resolved an issue which caused the “It looks like you haven’t used Cover in the last 2 weeks” form to appear more than once. [Ref: TG-14072]
-
IntelliJ Plugin: Resolved an issue which, in some circumstances, provokes IDEA error reports due to an
AssertionError
. [Ref: TG-14060] -
IntelliJ Plugin: Resolved an issue which, in some circumstances, provokes IDEA error reports due to an
NullPointerException
. [Ref: TG-14053] -
IntelliJ Plugin: Resolved an issue where user defined system properties and memory options were not applied to the project being analyzed. [Ref: TG-13904]
Known Issues
-
CLI: Windows: creating
config.json
by outputting--example-config
as file causes exceptions. [Ref: TG-11198] -
CLI: All tests may be discarded in test validation when using
--config
. [Ref: TG-11475] -
CLI:
dcover clean --working-directory
throws an error if--test-output-dir
is not provided. [Ref: TG-11665] -
CLI: Cover fails to generate tests, reporting
java.lang.OutOfMemoryError
, when analyzing projects which spawn a quantity of threads in excess of the operating system’s process thread limit. [Ref: TG-11680] -
CLI:
dcover clean --failing
fails when used with a Gradle project. [Ref: TG-11707] -
IntelliJ Plugin:
Diffblue Cover was unable to create an index
error may appear if switching project happens before Cover has finished indexing. [Ref: TG-13772]