Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 779
Simon Martinelli Avatar asked Nov 30 '20 12:11

Simon Martinelli


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>
like image 80
Simon Martinelli Avatar answered Sep 28 '22 18:09

Simon Martinelli


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.

like image 38
rogerdpack Avatar answered Sep 28 '22 19:09

rogerdpack