2022-02-01

JUnit selection updated

If both JUnit 4 and JUnit 5 are on the class path, Diffblue Cover no longer attempts to automatically select a version. Instead, Cover will stop and you will receive a message directing you to choose the relevant version of JUnit, using the --testing-framework option to select a testing framework, e.g. --testing-framework=junit-4 or --testing-framework=junit-5. For further information, please see our documentation.

Please use the --testing-framework option to select a testing framework, e.g. --testing-framework=junit-4 or --testing-framework=junit-5.

Other enhancements

This release, Diffblue Cover also offers the following:

  • A notification if the only tests written are time-sensitive. For further information, please see our documentation{: target="_blank" rel="noopener"}.

  • Tests with mocks of generic methods.

  • Deterministic input values for JodaTime objects.

  • Support for Gradle 7.x and Maven 3.8.x.

Developer Edition trial available

We are delighted to now offer a 14-day trial version of our Developer Edition, which includes the Diffblue Cover CLI, as part of our new licensing option. We're really excited that you can now "try before you buy"! To download your trial of Diffblue Cover Developer Edition, please click here. Full information on all our options is also available here.

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.

Enhancements

  • Cover now supports Gradle 7.x. [Ref: TG-16041]

  • Cover now supports Maven 3.8.x. [Ref: TG-16040]

  • Cover is now able to write tests for code using the LMAX Disruptor library. [Ref: TG-16433]

  • Cover now has improved support for mocking of generic methods. [Ref: TG-15702]

  • Cover now reports R031 as an output code if it was only able to write tests containing time-sensitive assertions. [Ref: TG-16441]

  • Cover now uses deterministic fixed-time instances when Joda Time data types are used as test inputs. [Ref: TG-16412]

  • Cover now has improved detection of methods which depend on date or time information, which reduces the chance of writing non-deterministic tests. [Ref: TG-16371]

  • Cover now adds a comment when it was unable to write a Spring test and wrote a non-Spring test instead. [Ref: TG-16353]

  • Cover now reports an error when it detects that Diffblue tests are compiled as Groovy using the gmaven-plus Maven plugin. [Ref: TG-16279]

  • CLI: Cover no longer attempts to automatically select a version of JUnit to use if JUnit 4 and JUnit 5 are on the class path. Cover will now exit with E087. A version can be manually specified using --testing-framework. [Ref: TG-15734]

  • IntelliJ Plugin: Cover's testability gutter icons now provide a faster testability information and are more responsive. [Ref: TG-16226]

Resolved Issues

  • Resolved an issue which, in some circumstances, on large projects, could cause Cover to fail to produce tests with an E016 result code. [Ref: TG-16459]

  • IntelliJ Plugin: Resolved an issue which could cause Cover to write tests in an incorrect module on a multi-module Maven project. [Ref: TG-16327]

  • Resolved an issue which would cause Cover to use /tmp as an input for paths, leading to platform-specific tests being written. [Ref: TG-15907]

Known Issues

  • CLI: The command dcover clean --failing does not work on Gradle projects. This command is now deprecated and dcover validate should be used instead. [Ref: TG-11707]

  • IntelliJ Plugin: Diffblue Cover was unable to create an index error may appear if switching projects happens before Cover has finished indexing. [Ref: TG-13772]

  • On certain projects, Cover may take longer to execute and even hang during the analysis of certain classes. While this is being worked on, we recommend excluding from analysis any class/package that shows such a behavior using --exclude. [Ref: TG-16471]

Last updated