-
Notifications
You must be signed in to change notification settings - Fork 16
/
wtd.bat
32 lines (29 loc) · 1.38 KB
/
wtd.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
@echo off
::set Path=lib;%Path%
chcp 65001
set startTime=%1
if {%1}=={} ( set startTime="test")
set runCycles=%2
set runDuration=%3
set currentTime=%time:~0,2%
if {%1}=={} (if {%2}=={} (if {%3}=={} java -Dfile.encoding=UTF-8 -cp bin/lib/wtd.jar;bin/lib/dom4j-1.6.1.jar;bin/lib/jaxen-1.1.1.jar;bin/lib/log4j-1.2.17.jar;bin/lib/selenium-server-standalone-2.53.0.jar;bin/lib/activation-1.1.1.jar;bin/lib/javax.mail-1.5.6.jar;bin/lib/mysql-connector-java-5.0.5.jar;bin/lib/substance-7.3.jar;bin/lib/trident-1.3.jar;bin/lib/trident-7.3-swing.jar com.pub.wtd.common.Main
)
) else ( if not {%1}=={} (if not {%2}=={} (if not {%3}=={} (
::start to launch the schedule
:mark
set currentTime=%time:~0,2%
if %startTime% equ %currentTime% (
for /L %%i in (1,1,%2) do (
echo ********************start the new cycle test********************
java -Dfile.encoding=UTF-8 -cp bin/lib/wtd.jar;bin/lib/dom4j-1.6.1.jar;bin/lib/jaxen-1.1.1.jar;bin/lib/log4j-1.2.17.jar;bin/lib/selenium-server-standalone-2.53.0.jar;bin/lib/activation-1.1.1.jar;bin/lib/javax.mail-1.5.6.jar;bin/lib/mysql-connector-java-5.0.5.jar;bin/lib/substance-7.3.jar;bin/lib/trident-1.3.jar;bin/lib/trident-7.3-swing.jar com.pub.wtd.common.Main
ping 127.0.0.1 -n %3 >null
)
echo *******************finish one cycle test*************************
)
echo ***********sleep 60 seconds for the next cycle test**************
ping 127.0.0.1 -n 60 >null
goto mark
)
)
)
)