-sourcedir error while running testNG xml via cmd line



my test NG jar is in C:\TestNG\testng.jar,'


testNG xml : D:\auto\auto\testng.xml


java classes: D:\auto\auto\src\CloudPlatform\*


selenium: C:\Users\muthus\Downloads\selenium-java-2.43.1\selenium-2.43.1\selenium-2.43.1.jar


Ive set classpath as : C:\TestNG\testng-5.5.jar;C:\Users\muthus\Downloads\selenium-java-2.43.1\selenium-2.43.1\selenium-2.43.1.jar;D:\auto\auto\src\CloudPlatform\*


Am unable to run it via cmd prompt with the below issue:



D:\auto\auto>java -cp C:\TestNG\testng-5.5.jar;D:\auto\auto\src\CloudPlatform\*;
org.testng.TestNG testng.xml


Error:



D:\auto\auto>java -cp C:\TestNG\testng-5.5.jar;D:\auto\auto\src\CloudPlatform\*;
org.testng.TestNG testng.xml
Exception in thread "main" org.testng.TestNGException:
No sourcedir was specified
at org.testng.TestNG.checkConditions(TestNG.java:1170)
at org.testng.TestNG.privateMain(TestNG.java:1010)
at org.testng.TestNG.main(TestNG.java:997)


gave the source dir parameter as : D:\auto\CP\src\CloudPlatform>java -cp C:\TestNG\testng-5.5.jar;D:\auto\auto\src\CloudPlatform\*; org.testng.TestNG testng.xml -sourcedir D:\auto\auto\src\CloudPlatform\*


Still Error persists:



Exception in thread "main" org.testng.TestNGException:
No sourcedir was specified
at org.testng.TestNG.checkConditions(TestNG.java:1170)
at org.testng.TestNG.privateMain(TestNG.java:1010)
at org.testng.TestNG.main(TestNG.java:997)


Need your valuable help on this!


1 comment: