在pom文件中
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
scope的意思指只能在test文件夹内使用@Test
将scope标签删除,即可在全局使用测试单元
在pom文件中
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
scope的意思指只能在test文件夹内使用@Test
将scope标签删除,即可在全局使用测试单元