开发者

How do I control which tests to run in testng from ant?

开发者 https://www.devze.com 2023-03-03 04:50 出处:网络
In build.xml: the testng target has attributes like \"testname\" and \"suitename\". But开发者_如何学运维 these do not seem to activate or deactivate the corresponding tests or suites within the testng

In build.xml: the testng target has attributes like "testname" and "suitename". But开发者_如何学运维 these do not seem to activate or deactivate the corresponding tests or suites within the testng.xml file

Is this the right way to use these?

How can I control which tests or suites are run from within build.xml that references testng.xml?

Thanks.


I found this post to solve a similar problem:

http://www.nullin.com/2009/12/23/running-single-test-or-class-using-testng-and-ant/

As long as you can fit whichever parameters you want in the template (or make them replaceable), you can get most of the benefits from both approaches.


You can't select a testng.xml and tell TestNG which tests to pick from that testng.xml. Use a different testng.xml file to do that.

The command line and ant/maven allow you to do some rudimentary selection too, but then you can't specify a testng.xml.

0

精彩评论

暂无评论...
验证码 换一张
取 消