解决 Idea 创建 Gradle 工程使用 Junit5 单元测试时出现 Class Not Found 的问题

不能直接点
image
否则就会出现错误
image
image
image
因为直接点运行出现的是 Gradle 任务
image
正常情况下使用的是 JUnit 任务
因此,需要手动点击 + 创建 JUint 任务
image
设置好 JDK运行模块测试类 就好了
image

posted @ 2022-03-12 09:40  博麗靈夢  阅读(667)  评论(0编辑  收藏  举报