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