为了账号安全,请及时绑定邮箱和手机立即绑定

junit报错java.lang.Exception: No tests found matching

junit报错java.lang.Exception: No tests found matching

aluckdog 2018-12-07 13:38:47
java.lang.Exception: No tests found matching [{ExactMatcher:fDisplayName=test], {ExactMatcher:fDisplayName=test(org.devin.hellochat.test.Test)], {LeadingIdentifierMatcher:fClassName=org.devin.hellochat.test.Test,fLeadingIdentifier=test]] from org.junit.internal.requests.ClassRequest@31befd9f at org.junit.internal.requests.FilterRequest.getRunner(FilterRequest.java:40) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createFilteredTest(JUnit4TestLoader.java:77) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:68) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:43) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:444) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
查看完整描述

1 回答

?
ITMISS

TA贡献1871条经验 获得超8个赞

我使用的是 junit 4.12版本,

去 maven 官网查的结果

<dependencies>
       <dependency>
           <groupId>org.hamcrest</groupId>
           <artifactId>hamcrest-core</artifactId>
           <version>1.3</version>
       </dependency>
</dependencies>

所以 junit4.12 依赖 hamcrest1.3, 需要再导入 hamcrest-core 包

查看完整回答
反对 回复 2018-12-16
  • 1 回答
  • 0 关注
  • 5126 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信