布置JUnit环境
对于需要使用JUnit进行单元测试的maven项目,添加对JUnit相关jar包的依赖,打开这个project的pom.xml文件,引入以下dependency
<!--junit--> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.7</version> <scope>test</scope> </dependency>
具体要引用哪个版本的JUnit,在version
节点配置,scope
节点配置一般情况是