How to pass particular test method name to testng.xml file from maven command -
i want pass particular test method pass testng.xml file using maven command , how read parameter in testng.xml
maven-surefire-plugin used in pom.xml
<plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-surefire-plugin</artifactid> <version>2.17</version> <configuration> <suitexmlfiles> <suitexmlfile>testng.xml</suitexmlfile> </suitexmlfiles> </configuration> </plugin>
below testng.xml file
<!doctype suite scheme "http://testng.org/testng-1.0.dtd" > <suite name="suite1" verbose="1" > <test name="nopackage" > <classes> <class name="com.ariveguru.tests.eservesanitytest" /> </classes> </test> </suite>
what test method's name?
if include/exclude tests, surefire plugin allows inclusions , exclusions of tests, not individual methods. accomplish move methods in question own test class, if feasible.
maven testng maven-surefire-plugin
No comments:
Post a Comment