Executing tests from a .bat file is familiar or useful while using GRID. There are couple of ways to execute this.
1| Copy any one of the below methods in text file
2| Edit the drive location
3| Save it as yourtext.bat
4| Now, double click on the batch file created.
Note: Its better to execute from cmd prompt before try
Method #1
cd C:\Workspace\projectname
java -cp C:\Workspace\projectname\lib\*;C:\Workspace\projectname\bin org.testng.TestNG testng.xml
Method #2
cd C:\Workspace\projectname
set ProjectPath=C:\Workspace\projectname
echo %ProjectPath%
set classpath=%ProjectPath%\bin;%ProjectPath%\lib\*
echo %classpath%
java org.testng.TestNG %ProjectPath%\testng.xml
which lib folder are you referring to here?
ReplyDeleteI am running my selenium script from eclipse and I can't find any lib folder in my workspace project folder.
Any help would be appreciated.
Thanks,
Sumit
could not find or load main class org.testng.Testng
ReplyDeletewhats this mean
My Eclipse script reads data from Excel through DataProvider. Testng.xml works fine when i run it from Eclipse>Run As>TestNG Suite. But if i try to run it from bat file it fails with no error message.
ReplyDeleteto execute maven project through jenkin what to write in .bat file
ReplyDeletecheap golden goose
ReplyDeletefear of god outlet
stephen curry shoes