JUnit的报错“No tests found with test runner JUnit4”


Eclipse总是报错: No tests found with test runner JUnit4


1 你有没有导入Junit包(eclipse中就自带了) 如果用到了spring的测试类 有没导入 spring-test包

2 你的包版本是否太低

3 有没 使用@TestCase 注解

4 有没继承TestCase类 或相关测试父类 (好像Spring-Test 不需要)

5 引用TestCase了吧


后来我都做到了 却又报了The input type of the launch configuration does not exist错误


If you are getting the above error message in Eclipse IDE, while running your test case, just make sure that you have the test class as a part of the “eclipse source folder” definition. Easiest way. Right click on the folder –> Build Path –>Use as source folder Done.
©️2020 CSDN 皮肤主题: 编程工作室 设计师:CSDN官方博客 返回首页