前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Spring 2.4.0 的测试引擎 junit-vintage

Spring 2.4.0 的测试引擎 junit-vintage

原创
作者头像
HoneyMoose
修改2021-01-29 10:17:37
6600
修改2021-01-29 10:17:37
举报
文章被收录于专栏:CWIKIUSCWIKIUS

从 Spring Boot 2.4.0 的测试引擎已经使用 Junit 5 的测试了。

因此测试引擎不再需要 exclude junit-vintage 到 Spring Boot 的测试依赖了。

2.4.0 的测试实例应该使用下面的依赖配置:

代码语言:javascript
复制
        <!-- TESTS -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <scope>test</scope>
        </dependency>

这个问题在 2.3.3 的版本出现了上面的问题,有关这个问题的描述和解决方法,请参考:JUnit 5 测试 Spring 引擎的时候提示 junit-vintage 错误

中的内容。

spring-test-01
spring-test-01

测试引擎 junit-vintage 主要是版本兼容性的问题。

https://www.ossez.com/t/spring-2-4-0-junit-vintage/13243

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档