Prerequisites for installing Cover CLI
Prerequisites
- 16 GB RAM, 5 GB minimum disk space, 4 CPU cores
- Windows 10, Ubuntu 18.04, RHEL 7.7, macOS 10.15
- Java 8 (version 161+), Java 11 (but please note that Java 11.0.7 is NOT supported) or Java 17 source code. Only 64 bit Java is supported.
- Maven projects, version 3.2.5 and above
- Gradle projects, version 4.9 and above
- JaCoCo 0.8.3 and above.
Dependencies
Dependencies required for running tests should be in the project configuration. JUnit is always mandatory but other libraries may also be necessary depending on the project under test.
Dependency | When | Version |
---|---|---|
Surefire Plugin (org.apache.maven.plugins:maven-surefire-plugin )
|
When using Maven and junit-jupiter-engine | 3.0.0-M7 |
JUnit (junit:junit or org.junit.jupiter:junit-jupiter-engine )
|
Unless using Spring or Spring Boot | 4.7+ |
JUnit Launcher (
org.junit.platform:junit-platform-launcher )
|
When using junit-jupiter-engine, unless using Maven, Spring or Spring Boot | 1+ |
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 Boot
|
4.2.5+, matching version |
Mockito (org.mockito:mockito-core )
|
4.1.0+ for Java 17 2.22.0+ for Java 11 1.9.5+ for Java 8 |
Other 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 console output indicating a missing dependency.
Dependency | Version |
---|---|
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 |
Spring projects and Hamcrest
Either:
- Use the
spring-boot-starter-test
dependency to add Hamcrest - Add
org.hamcrest:hamcrest
. The version of Hamcrest needs to match the relevant version ofspring-boot-test
. For example, if the user hasspring-boot-test:2.4.6
, they should look at the dependency list: Maven Repository: org.springframework.boot spring-boot-starter-test 2.4.6. This shows that the matching version is Hamcrest 2.2 (you may have to scroll).