What's New > Version 2021.03.01

Diffblue Cover CE can now be used for commercial code

Release date: Mar 01, 2021

Diffblue Cover Community Edition can now be used with commercial projects

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.

Writing your first test with Diffblue Cover IntelliJ plugin

Getting started with your new plugin? A quick-start guide is below, and this is covered in greater detail in our documentation.

  1. Make sure your project compiles.
  2. Find a method or class for which you want to generate tests.
  3. Right click on this method or class, and select Write Tests.
  4. Look at your new tests in /src/test/java

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

  • CLI: Cover now only writes tests with the @SpringBootTest annotation when the --spring-integration-test option is used. [Ref: TG-13843]

  • Cover now writes more high quality tests by only mocking when it cannot write tests without it. [Ref: TG-13752]

  • Cover no longer attempts to mock JDK classes in tests as they can be instantiated. [Ref: TG-13740]

  • Cover now initializes entity objects, even in non-Spring projects. [Ref: TG-13732]

  • Cover now writes tests for classes implementing Spring’s Validator interface even for projects without a proper Spring configuration/application class. [Ref: TG-13661]

  • Cover now mocks Exception results when the method under test has catch blocks. [Ref: TG-13616]

  • Cover now assigns public fields if required to write a test. [Ref: TG-12858]

Resolved Issues

  • CLI: Resolved an issue where Cover failed and didn’t generate tests, on projects located at the root of the com package. [Ref: TG-13792]

  • CLI: Resolved an issue where an incorrect option was suggested in a hint if test validation failed. [Ref: TG-13754]

  • Resolved an issue where Cover does not create @MockBean fields for components which use constructor dependency injection, resulting in an increased R008 count. [Ref: TG-13700]

  • Resolved an issue where tests with unnecessarily large numbers of elements in Java collections were produced. [Ref: TG-13690]

  • CLI: Resolved an issue where Cover may hang indefinitely if a previously analysed project is rebuilt with an earlier JDK. [Ref: TG-13670]

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 analysing 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 indexing completion. [Ref: TG-13772]

  • IntelliJ Plugin: Installing a paid version of Cover from disk, without ‘JetBrains Marketplace Licensing Support’ plugin present, results in an inability to write tests. [Ref: TG-13890]