迁移到SpringBoot2.4.0后不再使用故障安全插件执行IT

我有一些使用故障安全插件运行的集成测试。这一直有效,Spring Boot 2.3.5.RELEASE但在迁移到2.4.0IT后不再执行。

1)有人有同样的问题吗?

2) 如何调试故障安全以找出未执行测试的原因?

回答

问题是 IT 是 Junit4 测试,而 Spring Boot 2.4.0 删除了老式的 Junit 依赖项。

我不得不添加以下依赖项。

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


以上是迁移到SpringBoot2.4.0后不再使用故障安全插件执行IT的全部内容。
THE END
分享
二维码
< <上一篇
下一篇>>