Hi all, TestNG accepts a command line argument called "testnames" that specifies the name of the tests from the testing.xml to be executed. (http://testng.org/doc/documentation-main.html)
Currently, I have a requirement to control which tests are to be executed from a testing.xml file when executing through the surefire plugin. I browsed through the documentation of the surefire plugin and there seems to be no explicit way to configure "testnames" argument for the testng configured by the surefire plugin while executing the tests. For eg, if the testng.xml is as follows: <test annotations="JDK" name="test1" verbose="2"> ....... </test> <test annotations="JDK" name="test2" verbose="2"> ....... </test> I want to be able to control if test1 or test2 is executed through the surefire plugin or the maven command. It would help if somebody knows of a way to do this. PS: I tried passing "testnames" under the <properties> or </systemProperties> section for the surefire configuration and that does not seem to work. Thanks, Ravi