文件引入testng"/>
Idea中maven项目pom文件引入testng
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns=".0.0"xmlns:xsi=""xsi:schemaLocation=".0.0 .0.0.xsd"><modelVersion>4.0.0</modelVersion><groupId>yjk</groupId><artifactId>yjk</artifactId><version>1.0-SNAPSHOT</version><!--在pom.xml文件插入如下依赖引入textng:--><dependencies><dependency><groupId>org.testng</groupId><artifactId>testng</artifactId><version>6.14.3</version><scope>test</scope></dependency></dependencies>
</project>
在pom.xml文件引用testng的时候,有个标签<scope>test</scope>
限制了只能在test目录下使用
**
解决:
**
将上面pom.xml文件中的<scope>test</scope>
去掉就可以在main文件夹下使用。
<dependencies><dependency><groupId>org.testng</groupId><artifactId>testng</artifactId><version>6.14.3</version></dependency></dependencies>
更多推荐
Idea中maven项目pom文件引入testng
发布评论