Yo008
Yo008
2017-04-26 01:03

junit 测试 spring-mybatis 报的奇葩异常

  • junit
  • 测试
  • 绿色
  • 异常

测试datasource: junit绿色通过,没毛病。

测试sessionfactory报如下错误:

 java.lang.Exception: No tests found matching [{ExactMatcher:fDisplayName=testSqlSessionFactory], {ExactMatcher:fDisplayName=testSqlSessionFactory(test.MyBatisTest)], {LeadingIdentifierMatcher:fClassName=test.MyBatisTest,fLeadingIdentifier=testSqlSessionFactory]] from org.junit.internal.requests.ClassRequest@19ebb3d
    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:678)
    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条回答

为你推荐

换一换