带有Spring的JUnit5的规范Maven依赖关系是什么?

问题描述 投票:0回答:1

此问题与How to automatically migrate from JUnit 4 to JUnit 5?有关,但完全不同。

我只对Maven依赖感兴趣。 JUnit 5已被拆分为许多依赖项,并且还具有一个名为Jupiter Engine的东西,这看起来很有希望,但是当我尝试执行测试时就给出了这一点:

enter image description here

为了获得可用的@Test批注和与AbstractJUnit4SpringContextTests等效并与JUnit 5一起使用,最小,规范的一组依赖是什么?

junit5 spring-test
1个回答
0
投票

为了运行junit 5,您需要此依赖项:

 <dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.6.2</version>
<scope>test</scope>

© www.soinside.com 2019 - 2024. All rights reserved.