您的位置:首页 > 其它

JUnit的报错“No tests found with test runner JUnit4”和“The input type of the launch configuration does not exist”

2010-05-26 21:59 1296 查看
【前言】不爽!!!

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.
点着你的包右击点 buildPath 点 Use as source folder Done.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐