0

I have tried many things to run my testng.xlm file from terminal but can't run it. I have downloaded latest versions of testng.jar and jcommander.jar and provided path of them in following command

java -cp "PATH/TO/TESTNG.jar:PATH/TO/jcommander-1.7.jar" org.testng.TestNG testng.xml

But I am getting error as

Error: Could not find or load main class testng.xml

Cœur
  • 37,241
  • 25
  • 195
  • 267
  • Could you please copy and paste your concrete command? What I could think of: there is no blank char (0x20) between the parameters `.../jcommander-1.7.jar" org.testng.TestNG`. If `TestNG` could not be found you would get `Error: Could not find or load main class org.testng.TestNG`. – SubOptimal Apr 19 '16 at 05:41
  • http://stackoverflow.com/questions/11896791/how-to-run-testng-from-dos-prompt – murali selenium Apr 19 '16 at 05:51
  • This is the command I am using in my terminal to run testng.xml java -cp "Users/prasad/Documents/workspace/MyProject/testng-6.8.5.jar:/Users/prasad/Docum‌​ents/workspace/MyProject/jcommander.jar" org.testng.TestNG testng.xml – Prasad Bulbule Apr 19 '16 at 06:37

0 Answers0