No tests found Matching Methed

环境说明:spring test + junit 4.12 运行测试用例报错
搜索结果:
1、更换junit版本为: 4.8
2、增加hamcrest-core1.3
<dependencies>
       <dependency>
           <groupId>org.hamcrest</groupId>
           <artifactId>hamcrest-core</artifactId>
           <version>1.3</version>
       </dependency>
</dependencies>
junit4.12 依赖 hamcrest1.3, 需要再导入 hamcrest-core 包
链接: http://repo2.maven.org/maven2/org/hamcrest/hamcrest-all/1.3/

猜你喜欢

转载自liuzidong.iteye.com/blog/2410006