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

上一篇:20201015-2 alpha week 1/2 Scrum立会报告+燃尽图 06


下一篇:JAVA 实现json diff