1:错误 一出现错误,立马百度,结果进入了一个死循环,半天出不了结果 java.lang.Exception: No tests found matching [{ExactMatcher:fDisplayName=delete(int)], {LeadingIdentifierMatcher:fClassName=spring.jdbctemplate.Test1
1:错误
一出现错误,立马百度,结果进入了一个死循环,半天出不了结果
java.lang.Exception: No tests found matching [{ExactMatcher:fDisplayName=delete(int)], {LeadingIdentifierMatcher:fClassName=spring.jdbctemplate.Test1,fLeadingIdentifier=delete]] from org.junit.internal.requests.ClassRequest@6e5e91e4
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)
实际上仔细观察打印出来的错误信息
java.lang.Exception: No tests found matching [{ExactMatcher:fDisplayName=delete(int)],说明 delete方法出现了,问题, 一看就明白了,junit测试方法只能是public void xxx() 改过来了,立马解决问题,