0
How can we run TestNG project using command prompt? I am using maven.

Open 2 Answers 66 Views
0 2
How can we run TestNG project using command prompt? I am using maven.

2 Answers

1
1

HI,

Using suite XML Files and surefire plugin :

This allows flexible configuration of the tests to be run. These files are created in the normal way, and then added to the Surefire Plugin configuration

POM:

<plugins>
    [...]
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.21.0</version>
        <configuration>
          <suiteXmlFiles>
            <suiteXmlFile>testng.xml</suiteXmlFile>
          </suiteXmlFiles>
        </configuration>
      </plugin>
    [...]
</plugins>
in cmd  : mvn clean test -DsuiteFile=testng.xml 
answered by
1
1 answered by

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.



Top Contributors

...