junit需要的jar包:
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
编写测试用例进行测试的时候,出现如下异常
解决此问题的方法为,添加此 hamcrest-core-1.3包.pox.xml文件中添加:
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>