Could not find or load main class org.testng.TestNG

3,527 views
Skip to first unread message

Himanshu S

unread,
Jul 27, 2013, 2:33:57 AM7/27/13
to webd...@googlegroups.com
I am trying to run TestNG from command line but it is giving me error. Can someone tell me where am I going wrong?

java -cp C:/TestNG directory/testng-6.2.jar:C:\project directory\src\com\suites\suite\shop org.testng.TestNG testng.xml

Error: Could not find or load main class org.testng.TestNG

My scripts runs fine when I ran them from eclipse testng plugin.

Thanks.

Krishnan Mahadevan

unread,
Jul 27, 2013, 2:45:45 AM7/27/13
to webd...@googlegroups.com
To begin with, this is not a WebDriver/Selenium question.

You are better off posting this query on Testng-users forum.

You would be using the colon as a separator on UNIX and on windows its going to be semi colon.

-- 

Thanks and Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

--
You received this message because you are subscribed to the Google Groups "webdriver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webdriver+...@googlegroups.com.
To post to this group, send email to webd...@googlegroups.com.
Visit this group at http://groups.google.com/group/webdriver.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Himanshu S

unread,
Jul 27, 2013, 2:48:53 AM7/27/13
to webd...@googlegroups.com
Thanks.
I replaced the colon with semicolon but that doesn't seems to resolving the issue.

Mike Riley

unread,
Aug 1, 2013, 1:02:40 PM8/1/13
to webd...@googlegroups.com
You also have forward slashes as path separators and Windows/DOS uses backwards slashes.

Mike

Himanshu S

unread,
Aug 2, 2013, 6:13:53 AM8/2/13
to webd...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages