SpringBoot测试类没办法运行
Posted 程序员超时空
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了SpringBoot测试类没办法运行相关的知识,希望对你有一定的参考价值。
SpringBoot测试类没办法运行,找不到运行按钮
检查一下测试类的引入
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
是不是这两个,可能是 .test 的导包错了,导成了
import org.junit.Test;
要导
import org.junit.jupiter.api.Test;
引入这个依赖
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.8.2</version>
<scope>test</scope>
</dependency>
以上是关于SpringBoot测试类没办法运行的主要内容,如果未能解决你的问题,请参考以下文章