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