junit调试(No tests found matching )

使用junit调试程序时报错:
initializationError(org.junit.runner.manipulation.Filter)
java.lang.Exception: No tests found matching

大家总结的原因有:1.spring-test版本同spring版本不一致导致.
                         2.jar文件没有导入导致.
所谓的原因无非就是,目标文件加载失败.
  本地 pom.xml文件中引用junit版本4.12,使用@Test单元测试,各原因查找后,还是加载失败.决定使用eclipse自带单元测试.

操作: 项目右键 --- Build path --- Add Library --- Junit --- 选择Junit4 , 在使用@Test 运行成功

 

posted @ 2017-04-17 19:22  王树雨  阅读(454)  评论(0编辑  收藏  举报