话不多说,出现以下错误,如果各注解都没问题,请检查包路径
测试用例包路径必须跟项目启动类包路径一致,不然也会报下面错误
java.lang.Exception: No tests found matching [{ExactMatcher:fDisplayName=testAdd], {ExactMatcher:fDisplayName=testAdd(com.ymq.quye1.QuyeBuildingTest)], {LeadingIdentifierMatcher:fClassName=com.ymq.quye1.QuyeBuildingTest,fLeadingIdentifier=testAdd]] from org.junit.internal.requests.ClassRequest@41ab013
at org.junit.internal.requests.FilterRequest.getRunner(FilterRequest.java:40)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createFilteredTest(JUnit4TestLoader.java:83)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:74)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:49)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:525)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:763)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:463)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:209)