2024-04-01

This release introduces support for Spring WebFlux, a popular framework for reactive programming in Java. Diffblue Cover can now write tests for reactive-stack Spring web projects. Tests are written following Spring's best practices, using WebTestClient, applying the @WebFluxTest annotation to auto-configure the Spring WebFlux infrastructure, and asserting on reactive stream objects (Mono and Flux).

Enhancements

  • Cover now writes tests using the eq() argument matcher for both boxed primitives (e.g., Integer, Long) and unboxed primitives (e.g., int, long) in Mockito verify() statements. [Ref: TG-21084]

  • CLI: Cover now shows the coverage given by manual (non-Diffblue) and Diffblue tests when running coverage-reports command or create with --coverage-reports option. [Ref: TG-21081]

  • CLI & Reports: Cover CLI now supports overriding the project name and location of reports within the Reports organizational structure using the --location and --project-name options. [Ref: TG-21019]

  • Cover now checks compatibility between the versions of the javax.servlet (or jakarta.servlet) API and the Spring Core framework being used. If incompatible versions are found, Cover will report E107 (Incompatible Spring dependency). [Ref: TG-20958]

  • Plugin: Cover's License Details window now shows the email address used to verify the active Community Edition license. [Ref: TG-20940]

  • Cover now writes tests which assert on responses from Reactive controllers using expectStatus, expectHeader and expectBody. [Ref: TG-20853]

Resolved Issues

  • Resolved an issue which, in some circumstances, caused Cover to report spring-boot-starter-webflux as a missing dependency despite the project not containing Reactive controllers. [Ref: TG-21129]

  • Reports: Resolved an issue which, in some circumstances, caused tables to duplicate rows after changing the sorting order via column headings. [Ref: TG-21068]

  • Reports: Resolved an issue which, in some circumstances, caused <root> to be shown in the recent projects list [Ref: TG-21061]

  • Reports: Resolved an issue which, in some circumstances, caused an error to be displayed after navigating to the home screen while the coverage details tab is open. [Ref: TG-21060]

  • Reports: Resolved an issue which caused deleted projects to be visible in the recent projects list. [Ref: TG-21025]

  • CLI: Cover's environment summary output now reports Warning, rather than Success, for the 'Test Validation' row when Test Validation has been disabled by the user. [Ref: TG-20857]

  • Resolved an issue which caused Cover to, in some circumstances, discard tests written for methods which spawn threads. Cover now reports R011 (Sandboxing policy violation) when encountering methods which provoke sandboxing policy violations in a thread. [Ref: TG-20525]

Known Issues

  • Plugin: Cover Plugin incorrectly provides a menu option to write tests for a test file. [Ref: TG-17163]

  • Cover: Diffblue Cover may produce tests for JUnit 4.10 and lower that do not compile due to the use of assertNotEquals. [Ref: TG-17605]

  • Cover: Diffblue Cover supports Open JDK and Oracle JDK; results with other JDKs may differ due to the variability in their implementations of Java. [Ref: TG-19345]

  • Cover: Cover may encounter an F009: Internal error while writing tests using Mockito 5. To avoid this issue use a version of Mockito earlier than 5. [Ref: TG-19610]

  • Plugin: Under some circumstances, when writing Java tests for Kotlin code, Cover may produce non-compiling tests. [Ref: TG-20759]

Last updated