Prerequisites for the Diffblue Cover Plugin for IntelliJ

Prerequisites

  • IntelliJ version 2021.3 or later
  • Java 8 (version 161+), Java 11 (but please note that Java 11.0.7 is NOT supported) or Java 17 source code
  • Maven or Gradle-based project
  • JaCoCo 0.8.3 or above
  • 16 GB RAM, 4 CPU cores
  • 2 GB minimum memory requirement (to amend this in IntelliJ, select Help then Change Memory Settings)
  • Your project must compile and run.

Diffblue Cover runs the tests that it writes for your code, so your project must compile and run for Cover to work properly.

Dependencies

Your project configuration (e.g., pom.xml for Maven projects) must include all required dependencies, and they must all have been built or downloaded (e.g., by doing mvn clean install for Maven projects). JUnit is always a required dependency.

DependencyWhenVersion
JUnit (junit:junit or org.junit.jupiter:junit-jupiter-engine)Always unless using Spring or Spring Boot4.7+
Spring Boot Test (org.springframework:spring-boot-test)When using Spring Boot (org.springframework:spring-boot)2+, matching version
Spring Test (org.springframework:spring-test)When using Spring (org.springframework:spring-core) unless using Spring Boot4.2.5+, matching version

Dependencies listed below may be needed, if they are transitive dependencies of your project. If one of these dependencies is required but missing, tests will be generated for some classes but not others. A message will appear in the Event Log indicating a missing dependency.

DependencyVersion
Java Servlet API (javax.servlet:javax.servlet-api)4+, matching version
JSR107 API and SPI (javax.cache:cache-api)0.2+, matching version
Spring Boot Starter Test (org.springframework.boot:spring-boot-starter-test)2+, matching version
Spring Security Config (org.springframework.security:spring-security-config)4.2.1+, matching version
Spring Web MVC (org.springframework:spring-webmvc)5+, matching version

Please note that you can only run one instance of the Diffblue Cover plugin for IntelliJ on a project. Running more than one instance on the same project is NOT supported.

Memory Settings

The Diffblue Cover IntelliJ plugin requires 2GB of memory to run effectively. If you do not have enough memory available, Diffblue Cover will automatically adjust the memory setting. You can undo this change (but please note that your IDE may be unstable without sufficient memory).

If you wish to adjust the available memory manually, please go to Help - Change Memory Settings and amend the Maximum Heap Size to at least 2048, as shown below.

This will update the memory allocation in your .vmoptions file. Please restart your IDE for these changes to take effect.