junit initializationError

RepositoryTest.testDeleteAll (1)
initializationError(org.junit.runner.manipulation.Filter)
java.lang.Exception: No tests found matching [{ExactMatcher:fDisplayName=testDeleteAll], {ExactMatcher:fDisplayName=testDeleteAll(com.manage.dao.RepositoryTest)], {LeadingIdentifierMatcher:fClassName=com.manage.dao.RepositoryTest,fLeadingIdentifier=testDeleteAll]] from org.junit.internal.requests.ClassRequest@6895a785
	at org.junit.internal.requests.FilterRequest.getRunner(FilterRequest.java:40)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createFilteredTest(JUnit4TestLoader.java:80)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:71)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:46)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:523)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:761)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:461)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:207)

我用的是spring boot項目,jar都是自動添加的,因此不存在jar包問題。java

最終解決辦法是,類和測試的類包改爲一致。spring

相關文章
相關標籤/搜索