Perform the following steps for running
testng.xml through the command prompt:
TestJava project folder where the new
java -cp "/opt/testng-6.8.jar:bin" org.testng.TestNG testng.xml
In the preceding command we are adding the TestNG JAR and the project compiled code to the Java classpath by using the
-cp option of Java.
/opt/testng-6.8.jar is the path to the
testng JAR where you had downloaded it and it may be different for your system. Also,
bin is the folder containing the compiled code of the Java project. This can be found under the Eclipse project, which is under consideration. We ...