其他分享
首页 > 其他分享> > method 'initializationError' not found: Opening the test classs

method 'initializationError' not found: Opening the test classs

作者:互联网

Junit4单元测试报错:method 'initializationError' not found: Opening the test classs

1.缺包

除了junit还需要hamcrest-core和hamcrest-library。

下载:https://mvnrepository.com/

2.包版本不对

junit-4.13.jar,对应可以用网上大家普遍用的 hamcrest-core-1.3.jar和hamcrest-library-1.3.jar

而最新版hamcrest-core-2.2.jar和hamcrest-library-2.2.jar不行。

 

 

 

 

参考:

https://www.cnblogs.com/zlslch/p/8961587.html

标签:core,Opening,1.3,jar,library,initializationError,2.2,classs,hamcrest
来源: https://www.cnblogs.com/sybil-hxl/p/13217950.html