IT are no longer executed with failsafe plugin after migrating to Spring Boot 2.4.0

Viewed 1143

I have some integration tests that are run with the failsafe plugin. This works until Spring Boot 2.3.5.RELEASE, but after migrating to 2.4.0 the ITs are no longer executed.

  1. Does anybody have the same problem?

  2. How can I debug failsafe to find out why the tests are not executed?

2 Answers

The problem was that the ITs are Junit4 tests and Spring Boot 2.4.0 removed the vintage Junit dependency.

I had to add the following dependency.

<dependency>
    <groupId>org.junit.vintage</groupId>
    <artifactId>junit-vintage-engine</artifactId>
    <scope>test</scope>
    <exclusions>
        <exclusion>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-core</artifactId>
        </exclusion>
    </exclusions>
</dependency>

For me I "updated" my IT test so it uses Junit 5 style imports. Also failsafe plugin version -> 3.0.0-M5

Now they run.

Instead of silently not running, yikes.

Related