1. How to run testng tests from maven cmd
Prerequisite for Java
1. Java should be installed on your system.
2. Eclipse should be available.
3. Maven Java project should be created.
Prerequisite for TestNG
1. TestNG plugin should be added in eclipse IDE.
2. TestNG dependency should be added in pom.xml
3. TestNG tests should be created in your project.
4. testng.xml file should be created.
Prerequisite for Maven
1. Maven should be installed on your system.
2. Download maven https://maven.apache.org/download.cgi
3. Add maven to environment variables in your system.
4. Run the below command to check maven version
Command : mvn -version
2. Eclipse should be available.
3. Maven Java project should be created.
Prerequisite for TestNG
1. TestNG plugin should be added in eclipse IDE.
2. TestNG dependency should be added in pom.xml
3. TestNG tests should be created in your project.
4. testng.xml file should be created.
Prerequisite for Maven
1. Maven should be installed on your system.
2. Download maven https://maven.apache.org/download.cgi
3. Add maven to environment variables in your system.
4. Run the below command to check maven version
Command : mvn -version
How to provide testng.xml file name at runtime.
Step 1. In pom.xml in place of testng.xml file name give a reference
${fileName}
Step 2. In command add parameter
mvn clean test -DfileName=testng.xml
This is really informative blog, I have to thank for your efforts. Waiting for more post like this.
ReplyDeleteAutomation Anywhere Training in Chennai
Automation Anywhere online Training
Openspan Online Training
Openstack Online Training
Thanks Aarav, Sure you will find more post like this. Happy learning
ReplyDelete