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.
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值