Search code examples
javaspring-bootmaven-failsafe-plugin

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


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?


Solution

  • 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>