maven testng 运行指定的suite.xml


有时候,需要项目中会有多个测试套件,想要在不同的环境指定运行maven 指定的testng的suite.xml配置文件。

第一步 在pom.xml中添加配置

<build>
	<plugins>
		<plugin>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-surefire-plugin</artifactId>
		</plugin>
	</plugins>
</build>

 第二步,在运行的命令中指定要运行的suite

mvn clean test -Dsurefire.suiteXmlFiles=src/test/java/game-unit-test-suite.xml

 转自:http://www.xinyues.com/h-nd-188.html#_np=2_560


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM