Next-Gen App & Browser
Testing Cloud
Trusted by 2 Mn+ QAs & Devs to accelerate their release cycles
TestNG gives the facility to run tests using the command prompt. Here are the steps you can follow for the same:
java -cp <path of lib>; <path of out or bin folder>
org.testng.TestNG <path of testng>/testng.xml
By giving the classpath for the JVM, the path to the compiled.class files, and the location of the TestNG XML configuration file; this program performs TestNG tests in Java. TestNG subsequently reads the configuration file, and the given tests are executed.