Im having trouble creating a TestNG .Bat file (After several tries I have failed to create a successfull Bat file which will in turn execute my TestNG file 'testngSides.xml'.
I wish to execute the testng file: 'testngSides.xml' via a batch file, project structure:
I also have dependencies stored within the following location 'm2':
Many thanks for your help
Sorry could not write a comment due to lack of reputation. Add dependencies in your POM.xml to run the testing.xml(you will need maven surefire plugin too).Once dependencies are set, build your maven project and run maven test through your .bat file.
Create a .bat file with following content (edit it according to your project):
set myProjectpath=”PROJECT_PATH”
cd %myProjectpath%
set classpath=%myProjectpath%\bin;%myProjectpath%\lib\*
java org.testng.TestNG %myProjectpath%\testngSides.xml
Let me know if it helps.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.