I want to create a .bat file to run my TestNG test cases. I should be able to transfer the file to any computer and execute the test cases.
Is it possible to do the above in any way. If yes how?
Thanks
I want to create a .bat file to run my TestNG test cases. I should be able to transfer the file to any computer and execute the test cases.
Is it possible to do the above in any way. If yes how?
Thanks
See 4 - Running TestNG on TestNG's documentation page. There you will find information on how to run TestNG from the command line (the same commands can be used in a batch file).
Note that batch files are specific to Windows. If you want to be able to run this on any platform that supports Java and TestNG then I recommend that instead of a batch file you run TestNG programmatically from Java.