What's New > Version 2020.11.01/02/03

Spring functionality, mocking and Maven

Release date: Nov 09, 2020

This release includes the following enhancements: adding extra functionality for Spring controllers, adding support for DataJpaTest, adding support for the mocking of external services accessed through RestTemplate and OpenFeign’s FeignClient, improving support for mocking bounded generic methods, allowing custom Maven settings, and auto-applying Spring formatting when required on Maven projects.

Full Release Notes


  • CLI: Cover now allows a project-specific Maven settings.xml to be provided to dcover by using the --build-system-configuration CLI option. [Ref: TG-12942]

  • Cover now automatically formats tests using the Spring Java Format plugin if spring-javaformat is found in the Maven project’s POM. [Ref: TG-12937]

  • Cover now creates tests for Spring Boot components that use OpenFeign REST client, with the web client being mocked. [Ref: TG-12801]

  • Cover now has improved support for mocking of bounded generic methods. Tests now contain mocks of generic methods which have complex upper bounds (such as method type variable extends class type variable). [Ref: TG-12382]

  • Cover now creates tests for the implementations of DAO pattern that use JpaRepository. [Ref: TG-11987]

  • Cover now creates more tests for Spring Controllers that use cookies or path variables and more assertions for Spring Controllers that return forwarded or redirected URLs. [Ref: TG-11983]

  • Cover now creates tests for Spring components that use the RestTemplate web client, with the web client being mocked. [Ref: TG-11325]

  • CLI: Cover’s console output now highlights different log levels in different colors. [Ref: TG-13036]

Resolved Issues

  • IntelliJ Plugin: Resolved an issue where attempting to write tests for a method of a Spring Controller may result in Failed to insert a test into the generated test class. [Ref: TG-13042]

  • IntelliJ Plugin: Resolved an issue where phaserConfig.json not valid may be logged to the IntelliJ event log after clicking ‘Write Tests’ when an invalid JDK configuration is set. For example, if an invalid path to the JDK was specified. [Ref: TG-13025]

  • CLI: Resolved an issue where a NullPointerExeception may be thrown if an E009: Unrecoverable runtime error is encountered. [Ref: TG-13024]

  • IntelliJ Plugin: Resolved an issue where, in some cases, tests may contain non-natural looking variable names. For example, address may have been incorrectly replaced with param0. [Ref: TG-12936]

  • CLI: Resolved an issue where Error during invocation may be shown, rather than guidance, when no entry points match classes provided to dcover create. [Ref: TG-12930]

  • CLI: Resolved an issue where Cover may create a test which fails to compile if a mocked method has a varargs parameter and it’s overloaded. [Ref: TG-12897]

  • IntelliJ Plugin: Resolved an issue where an inconsistent internal index may result in plugin instability. If an issue with the internal index is encountered, the index will be automatically rebuilt. [Ref: TG-12697]

Known Issues

  • Wrong reason for not creating essential tests for methods in classes without accessible constructors. [Ref: TG-10794]