/ Published in: DOS Batch
Simply specify your test class name in SOURCE variable.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
@SET SOURCE=TestCreate @SET JUNIT=junit-4.0.jar @SET DRIVER=selenium-java-client-driver.jar @SET RUNNER=org.junit.runner.JUnitCore @ECHO Connecting to Selenium core server to test TestCreate @java -cp .;%CD%\%JUNIT%;%CD%\%DRIVER% %RUNNER% TestCreate @GOTO END :COMPILE_ERR @ECHO Error encounted during compiling. @GOTO END :MEM @rem @FOR %%i IN (%SOURCE%) DO @IF EXIST %%i.java ( @echo %%i ) ELSE ( @echo %%i missing. ) @ECHO Compiling TestCreate.java @javac -cp .;e:\code\java\selenium-java-client-driver.jar;e:\code\java\junit-4.0.jar TestCreate.java @rem @FOR %%i IN (%SOURCE%) DO @echo Compiling %%i.java ... && @javac -cp .;%CD%\selenium-java-client-driver.jar;%CD%\junit-4.0.jar %%i.java || @IF errorlevel 1 GOTO COMPILE_ERR @GOTO END :HELP @ECHO Options: @ECHO Use /clean to clean *.class @GOTO END :CLEAN @DEL /F /Q *.class @GOTO END :END