有时候,需要项目中会有多个测试套件,想要在不同的环境指定运行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

相关文章:

  • 2022-12-23
  • 2022-03-03
  • 2021-09-19
  • 2021-08-01
  • 2022-12-23
  • 2021-07-23
  • 2022-12-23
猜你喜欢
  • 2021-12-29
  • 2021-11-23
  • 2021-09-09
  • 2022-12-23
  • 2021-08-09
相关资源
相似解决方案