如何使用ant在testng.xml中运行特定组?

时间:2012-10-01 12:00:32

标签: xml ant testng

我必须根据testng.xml中的组运行测试。 哪个测试组必须包括想要使用ant。

例如。

<test name="Test1" preserve-order="true">
<groups>
<run>
<include name="Group1"/>
<include name="Group2"/>
</run>
</groups>
</test>

这里我想给输入Group1然后只运行Group1。

如何实现这一目标?请帮我。 感谢

1 个答案:

答案 0 :(得分:0)

如果您使用TestNG Ant plugin,,则可以直接将组指定为属性:

  

groups:要运行的组列表,以空格或逗号分隔。