java - 迁移到 Spring Boot 2.4.0 后,IT 不再使用故障安全插件执行
问题描述
我有一些使用故障安全插件运行的集成测试。这在 Spring Boot 2.3.5.RELEASE 之前有效,但在迁移到 2.4.0 之后,不再执行 IT。
有人有同样的问题吗?
如何调试故障安全以找出未执行测试的原因?
解决方案
问题在于 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>
推荐阅读
- java - Lucene:分页返回重复项
- db2 - 如何在 DB2 Warehouse On Cloud 上进行方案级别的备份?
- android - 使用带有离子和电容器的 https 加载 webview
- sql - 向数据库添加索引会更改查询结果
- javascript - 如何在 Javascript 中向 ul 添加图标的 li 项?
- python - 根据列的值绘制 axvspan
- php - 如何在 drupal8 上修复 RewriteBase
- dart - 从底部应用程序栏颤动更改页面
- java - Is there a way to inherit constructors in Kotlin?
- c# - 在 IIS 上运行 .NET 核心和 .NET Web 应用程序