How to use TesNG with Maven? OR How do call TestNG.xml from Maven?

The maven-surefire plugin is used to call testNG.xml file from maven as follows:

Add maven-surefireplugin from maven repository to POM.xml under build/<plugins>

add the path to testng.xml file  <configuration>/<suiteXmlFiles><suiteXmlFile> as follows:


Run as Maven test will run the testng.xml

Comments

Popular posts from this blog

Jenkins CICD in One Page

Why do we need a build tool?

Deutsche Bank Interview Questions - 2024