2022-08-05

Harmonized directory handling options

Deploying Cover is now even easier thanks to improvements to the command line options -–target-directory and -–working-directory. A new simplified workflow allows both types of functionality to be driven from a single option, --working-directory. This change reduces script maintenance overhead for our customers and improves command line readability.

Further details available here: https://docs.diffblue.com/knowledge-base/troubleshooting/working-directory-update-release-2022-08-05/{: target="_blank" rel="noopener"}

Enhancements to Static Mocking

Sandboxing is used by Diffblue Cover to run tests in a controlled environment in order to prevent inadvertent changes or damage to your system.

Execution inside Diffblue Cover's sandboxing environment prohibits certain operations, e.g. making connections to external services. In order to write tests for classes these operations need to be mocked.

Diffblue Cover now harnesses the power of static mocking to automatically mock methods that violate sandboxing restrictions, resulting in additional functional tests to further improve coverage of your code.

Added support for Mockito versions

We are pleased to bring to our customers support for all Mockito versions through to the recently released 4.7.0.

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 provides improved guidance when an R027 (Failed to create Spring context due to missing beans in the current Spring profile) has been encountered. [Ref: TG-17648]

  • Cover now supports Mockito 4.7.0. [Ref: TG-17614]

  • Cover now provides more detailed guidance to fix project test configuration issues which would prevent tests being written. [Ref: TG-17564]

  • CLI: Cover now provides more detailed remediation guidance if build system issues are detected. [Ref: TG-17547]

  • Cover now attempts to write tests which use static mocks where R011 (Sandboxing policy violation) would have previously been reported. [Ref: TG-17523]

  • CLI: Cover's CLI commands now produce their output relative to the working directory. The default target directory is working-directory/.diffblue. The --target-directory option has been removed and --working-directory should be used instead. [Ref: TG-17113]

Resolved Issues

  • Resolved an issue which caused Cover to report R024 (Analysis service shutdown unexpectedly) for classes with complex mutually recursive private methods. [Ref: TG-17621]

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]

Last updated