提供用户选择全部用例全部循环执行,还是指定那条用例执行,还可以由用户输入执行次数循环;
.bat文件:
@echo 欢迎使用自动化压力测试用例,脚本由本博主制作
color 0b
@echo 请按照界面相关提示语进行操作执行压力测试用例
pause
@echo *****************************************************************************
@echo 注意预置条件:1.hh260必须关闭LTE开关;2.群组必须大于2个;3.插公网卡+专网卡;**
@echo 注意预置条件:4.尽量不要让终端进行息屏待机;5.必须一直连接电脑USB跑; **
@echo 注意预置条件:6.首次连接要把USB调式打开,和确认; **
@echo *****************************************************************************
@echo 等待终端连接电脑,若连接失败请检查端口
adb wait-for-device
adb push D:\hh260AutoTestJARv0.01\hh260Auto.jar /data/local/tmp
ping 127.1 /n 2 > nul
@echo 连接成功
@echo 选择“1”.所有按顺序执行;选择“2”.选择指定用例执行
set /p choice=选择要按顺序执行“1”,还是指定用例执行“2”:
if /i %choice%==1 goto All
if /i %choice%==2 goto choiceOne
echo 输入无效请重新输入.搜索
rem 确认用户选择的用例,自动执行对应的脚本
:All
rem NO.1 按顺序执行全部用例
set /p count=请输入要循环的次数:
echo "test is: %count%"
for /l %%i in (1,1,%count%) do (
@echo 执行用例1
adb shell uiautomator runtest hh260Auto.jar --nohup -c hh260.dsy.FastGrout
@echo 若想继续执行下面的用例,等待执行后,注意终端端口连接态
adb wait-for-device
@echo 执行用例2
adb shell uiautomator runtest hh260Auto.jar --nohup -c hh260.dsy.PrivateContact
@echo 若想继续执行下面的用例,等待执行后,注意终端端口连接态
adb wait-for-device
@echo 执行用例3
adb shell uiautomator runtest hh260Auto.jar --nohup -c hh260.dsy.DeleteContacts
@echo 若想继续执行下面的用例,等待执行后,注意终端端口连接态
adb wait-for-device
@echo 执行用例4
adb shell uiautomator runtest hh260Auto.jar --nohup -c hh260.dsy.BtruncMessage
@echo 这条用例必须脱机跑,若想继续执行下面的用例,等待执行后,注意终端端口连接态
adb wait-for-device
@echo 执行用例5
@echo 预置条件:集群设置开关必须是开启态!
adb shell uiautomator runtest hh260Auto.jar --nohup -c hh260.dsy.BtruncSetting
@echo 若想继续执行下面的用例,等待执行后,注意终端端口连接态
adb wait-for-device
@echo 执行用例6
adb shell uiautomator runtest hh260Auto.jar --nohup -c hh260.dsy.BtruncSwitch
@echo 若想继续执行下面的用例,等待执行后,注意终端端口连接态
adb wait-for-device
@echo 执行用例7
adb shell uiautomator runtest hh260Auto.jar --nohup -c hh260.dsy.Camera
@echo 若想继续执行下面的用例,等待执行后,注意终端端口连接态
adb wait-for-device
@echo 执行用例8
adb shell uiautomator runtest hh260Auto.jar --nohup -c hh260.dsy.WLAN1
@echo 若想继续执行下面的用例,等待执行后,注意终端端口连接态
adb wait-for-device
@echo 执行用例9 WLAN2有bug,暂不能执行,跳过
rem adb shell uiautomator runtest hh260Auto.jar --nohup -c hh260.dsy.WLAN2
@echo 若想继续执行下面的用例,等待执行后,注意终端端口连接态
adb wait-for-device
@echo 执行用例10
adb shell uiautomator runtest hh260Auto.jar --nohup -c hh260.dsy.BT1
@echo 若想继续执行下面的用例,等待执行后,注意终端端口连接态
adb wait-for-device
@echo 执行用例11
adb shell uiautomator runtest hh260Auto.jar --nohup -c hh260.dsy.BT2
@echo 若想继续执行下面的用例,等待执行后,注意终端端口连接态
adb wait-for-device
@echo 执行用例12
adb shell uiautomator runtest hh260Auto.jar --nohup -c hh260.dsy.PrivateSwitchOne
@echo 这条用例必须脱机跑,若想继续执行下面的用例,等待执行后,注意终端端口连接态
adb wait-for-device
@echo 执行用例13
adb shell uiautomator runtest hh260Auto.jar --nohup -c hh260.dsy.PrivateSwitchTwo
@echo 这条用例必须脱机跑,若想继续执行下面的用例,等待执行后,注意终端端口连接态
adb wait-for-device
@echo 执行用例14
adb shell uiautomator runtest hh260Auto.jar --nohup -c hh260.dsy.PublicPrioritySwitch
@echo 若想继续执行下面的用例,等待执行后,注意终端端口连接态
adb wait-for-device
@echo 执行用例15
adb shell uiautomator runtest hh260Auto.jar --nohup -c hh260.dsy.AirplaneModeSwitch
@echo 若想继续执行下面的用例,等待执行后,注意终端端口连接态
adb wait-for-device
@echo 执行用例16
adb shell uiautomator runtest hh260Auto.jar --nohup -c hh260.dsy.AirplaneMode
@echo 若想继续执行下面的用例,等待执行后,注意终端端口连接态
adb wait-for-device
@echo 执行用例17
adb shell uiautomator runtest hh260Auto.jar --nohup -c hh260.dsy.CellurarData1
@echo 这条用例必须脱机跑,若想继续执行下面的用例,等待执行后,注意终端端口连接态
adb wait-for-device
@echo 执行用例18
adb shell uiautomator runtest hh260Auto.jar --nohup -c hh260.dsy.CellurarData2
@echo 这条用例必须脱机跑,若想继续执行下面的用例,等待执行后,注意终端端口连接态
adb wait-for-device
)
pause
@echo 选择“1”.所有按顺序执行;选择“2”.选择指定用例执行
set /p choice=选择要按顺序执行“1”,还是指定用例执行“2”:
if /i %choice%==1 goto All
if /i %choice%==2 goto choiceOne
echo 输入无效请重新输入.搜索
rem 确认用户选择的用例,自动执行对应的脚本
:choiceOne
@echo *********************************************************************
@echo 详情操作步骤见用例表,根据需要选择要执行的用例 *********
@echo *********************************************************************
@echo **1. 用例1:快拨组 界面请输入“1 ”,且回车**
@echo **2. 用例2:新增集群联系人 界面请输入“2 ”,且回车**
@echo **3. 用例3:删除集群联系人 界面请输入“3 ”,且回车**
@echo **4. 用例4:集群短消息 界面请输入“4 ”,且回车**
@echo **5. 用例5:集群设置 界面请输入“5 ”,且回车**
@echo **6. 用例6:集群功能开关 界面请输入“6 ”,且回车**
@echo **7. 用例7:相机 界面请输入“7 ”,且回车**
@echo **8. 用例8:WLAN 1 界面请输入“8 ”,且回车**
@echo **9. 用例9:WLAN 2 界面请输入“9 ”,且回车**
@echo **10.用例10:蓝牙 1 界面请输入“10”,且回车**
@echo **11.用例11:蓝牙 2 界面请输入“11”,且回车**
@echo **12.用例12:专网开关 1 界面请输入“12”,且回车**
@echo **13.用例13:专网开关 2 界面请输入“13”,且回车**
@echo **14.用例14:数据业务公网优先开关 界面请输入“14”,且回车**
@echo **15.用例15:飞行模式 1 界面请输入“15”,且回车**
@echo **16.用例16:飞行模式 2 界面请输入“16”,且回车**
@echo **17.用例17:移动数据网络 1 界面请输入“17”,且回车**
@echo **18.用例18:移动数据网络 2 界面请输入“18”,且回车**
@echo **19.用例19:自动开关机 界面请输入“19”,且回车**
@echo *********************************************************************
@echo 要执行哪条用例,请输入对应的数字,并按回车键 *********
@echo *********************************************************************
@echo :ks
set /p choice=请输入要执行用例序号:
if /i %choice%==1 goto FastGrout
if /i %choice%==2 goto PrivateContact
if /i %choice%==3 goto DeleteContacts
if /i %choice%==4 goto BtruncMessage
if /i %choice%==5 goto BtruncSetting
if /i %choice%==6 goto BtruncSwitch
if /i %choice%==7 goto Camera
if /i %choice%==8 goto WLAN1
if /i %choice%==9 goto WLAN2
if /i %choice%==10 goto BT1
if /i %choice%==11 goto BT2
if /i %choice%==12 goto PrivateSwitchOne
if /i %choice%==13 goto PrivateSwitchTwo
if /i %choice%==14 goto PublicPrioritySwitch
if /i %choice%==15 goto AirplaneModeSwitch
if /i %choice%==16 goto AirplaneMode
if /i %choice%==17 goto CellurarData1
if /i %choice%==18 goto CellurarData2
if /i %choice%==19 goto OnOff
echo 输入无效请重新输入.搜索
rem 确认用户选择的用例,自动执行对应的脚本
:FastGrout
set /p count=请输入要循环的次数:
echo "test is: %count%"
for /l %%i in (1,1,%count%) do (
@echo **1. 用例1:快拨组
adb shell uiautomator runtest hh260Auto.jar --nohup -c hh260.dsy.FastGrout
)
pause
set /p choice=请输入要执行用例序号:
if /i %choice%==1 goto FastGrout
if /i %choice%==2 goto PrivateContact
if /i %choice%==3 goto DeleteContacts
if /i %choice%==4 goto BtruncMessage
if /i %choice%==5 goto BtruncSetting
if /i %choice%==6 goto BtruncSwitch
if /i %choice%==7 goto Camera
if /i %choice%==8 goto WLAN1
if /i %choice%==9 goto WLAN2
if /i %choice%==10 goto BT1
if /i %choice%==11 goto BT2
if /i %choice%==12 goto PrivateSwitchOne
if /i %choice%==13 goto PrivateSwitchTwo
if /i %choice%==14 goto PublicPrioritySwitch
if /i %choice%==15 goto AirplaneModeSwitch
if /i %choice%==16 goto AirplaneMode
if /i %choice%==17 goto CellurarData1
if /i %choice%==18 goto CellurarData2
if /i %choice%==19 goto OnOff
echo 输入无效请重新输入.搜索
rem 确认用户选择的用例,自动执行对应的脚本
:PrivateContact
set /p count=请输入要循环的次数:
echo "test is: %count%"
for /l %%i in (1,1,%count%) do (
@echo **2. 用例2:新增集群联系人
adb shell uiautomator runtest hh260Auto.jar --nohup -c hh260.dsy.PrivateContact
)
pause
set /p choice=请输入要执行用例序号:
if /i %choice%==1 goto FastGrout
if /i %choice%==2 goto PrivateContact
if /i %choice%==3 goto DeleteContacts
if /i %choice%==4 goto BtruncMessage
if /i %choice%==5 goto BtruncSetting
if /i %choice%==6 goto BtruncSwitch
if /i %choice%==7 goto Camera
if /i %choice%==8 goto WLAN1
if /i %choice%==9 goto WLAN2
if /i %choice%==10 goto BT1
if /i %choice%==11 goto BT2
if /i %choice%==12 goto PrivateSwitchOne
if /i %choice%==13 goto PrivateSwitchTwo
if /i %choice%==14 goto PublicPrioritySwitch
if /i %choice%==15 goto AirplaneModeSwitch
if /i %choice%==16 goto AirplaneMode
if /i %choice%==17 goto CellurarData1
if /i %choice%==18 goto CellurarData2
if /i %choice%==19 goto OnOff
echo 输入无效请重新输入.搜索
rem 确认用户选择的用例,自动执行对应的脚本
:DeleteContacts
set /p count=请输入要循环的次数:
echo "test is: %count%"
for /l %%i in (1,1,%count%) do (
@echo **3. 用例3:删除集群联系人
adb shell uiautomator runtest hh260Auto.jar --nohup -c hh260.dsy.DeleteContacts
)
pause
set /p choice=请输入要执行用例序号:
if /i %choice%==1 goto FastGrout
if /i %choice%==2 goto PrivateContact
if /i %choice%==3 goto DeleteContacts
if /i %choice%==4 goto BtruncMessage
if /i %choice%==5 goto BtruncSetting
if /i %choice%==6 goto BtruncSwitch
if /i %choice%==7 goto Camera
if /i %choice%==8 goto WLAN1
if /i %choice%==9 goto WLAN2
if /i %choice%==10 goto BT1
if /i %choice%==11 goto BT2
if /i %choice%==12 goto PrivateSwitchOne
if /i %choice%==13 goto PrivateSwitchTwo
if /i %choice%==14 goto PublicPrioritySwitch
if /i %choice%==15 goto AirplaneModeSwitch
if /i %choice%==16 goto AirplaneMode
if /i %choice%==17 goto CellurarData1
if /i %choice%==18 goto CellurarData2
if /i %choice%==19 goto OnOff
echo 输入无效请重新输入.搜索
rem 确认用户选择的用例,自动执行对应的脚本
:BtruncMessage
set /p count=请输入要循环的次数:
echo "test is: %count%"
for /l %%i in (1,1,%count%) do (
@echo **4. 用例4:集群短消息
adb shell uiautomator runtest hh260Auto.jar --nohup -c hh260.dsy.BtruncMessage
)
pause
@echo 这条用例必须脱机跑,若想继续执行下面的用例,等待执行后,注意终端端口连接态
adb wait-for-device
set /p choice=请输入要执行用例序号:
if /i %choice%==1 goto FastGrout
if /i %choice%==2 goto PrivateContact
if /i %choice%==3 goto DeleteContacts
if /i %choice%==4 goto BtruncMessage
if /i %choice%==5 goto BtruncSetting
if /i %choice%==6 goto BtruncSwitch
if /i %choice%==7 goto Camera
if /i %choice%==8 goto WLAN1
if /i %choice%==9 goto WLAN2
if /i %choice%==10 goto BT1
if /i %choice%==11 goto BT2
if /i %choice%==12 goto PrivateSwitchOne
if /i %choice%==13 goto PrivateSwitchTwo
if /i %choice%==14 goto PublicPrioritySwitch
if /i %choice%==15 goto AirplaneModeSwitch
if /i %choice%==16 goto AirplaneMode
if /i %choice%==17 goto CellurarData1
if /i %choice%==18 goto CellurarData2
if /i %choice%==19 goto OnOff
echo 输入无效请重新输入.搜索
rem 确认用户选择的用例,自动执行对应的脚本
:BtruncSetting
set /p count=请输入要循环的次数:
echo "test is: %count%"
for /l %%i in (1,1,%count%) do (
@echo **5. 用例5:集群设置
adb shell uiautomator runtest hh260Auto.jar --nohup -c hh260.dsy.BtruncSetting
)
pause
set /p choice=请输入要执行用例序号:
if /i %choice%==1 goto FastGrout
if /i %choice%==2 goto PrivateContact
if /i %choice%==3 goto DeleteContacts
if /i %choice%==4 goto BtruncMessage
if /i %choice%==5 goto BtruncSetting
if /i %choice%==6 goto BtruncSwitch
if /i %choice%==7 goto Camera
if /i %choice%==8 goto WLAN1
if /i %choice%==9 goto WLAN2
if /i %choice%==10 goto BT1
if /i %choice%==11 goto BT2
if /i %choice%==12 goto PrivateSwitchOne
if /i %choice%==13 goto PrivateSwitchTwo
if /i %choice%==14 goto PublicPrioritySwitch
if /i %choice%==15 goto AirplaneModeSwitch
if /i %choice%==16 goto AirplaneMode
if /i %choice%==17 goto CellurarData1
if /i %choice%==18 goto CellurarData2
if /i %choice%==19 goto OnOff
echo 输入无效请重新输入.搜索
rem 确认用户选择的用例,自动执行对应的脚本
:BtruncSwitch
set /p count=请输入要循环的次数:
echo "test is: %count%"
for /l %%i in (1,1,%count%) do (
@echo **6. 用例6:集群功能开关
@echo 预置条件:集群设置开关必须是开启态!
adb shell uiautomator runtest hh260Auto.jar --nohup -c hh260.dsy.BtruncSwitch
)
pause
set /p choice=请输入要执行用例序号:
if /i %choice%==1 goto FastGrout
if /i %choice%==2 goto PrivateContact
if /i %choice%==3 goto DeleteContacts
if /i %choice%==4 goto BtruncMessage
if /i %choice%==5 goto BtruncSetting
if /i %choice%==6 goto BtruncSwitch
if /i %choice%==7 goto Camera
if /i %choice%==8 goto WLAN1
if /i %choice%==9 goto WLAN2
if /i %choice%==10 goto BT1
if /i %choice%==11 goto BT2
if /i %choice%==12 goto PrivateSwitchOne
if /i %choice%==13 goto PrivateSwitchTwo
if /i %choice%==14 goto PublicPrioritySwitch
if /i %choice%==15 goto AirplaneModeSwitch
if /i %choice%==16 goto AirplaneMode
if /i %choice%==17 goto CellurarData1
if /i %choice%==18 goto CellurarData2
if /i %choice%==19 goto OnOff
echo 输入无效请重新输入.搜索
rem 确认用户选择的用例,自动执行对应的脚本
:Camera
set /p count=请输入要循环的次数:
echo "test is: %count%"
for /l %%i in (1,1,%count%) do (
@echo **7. 用例7:相机
adb shell uiautomator runtest hh260Auto.jar --nohup -c hh260.dsy.Camera
)
pause
set /p choice=请输入要执行用例序号:
if /i %choice%==1 goto FastGrout
if /i %choice%==2 goto PrivateContact
if /i %choice%==3 goto DeleteContacts
if /i %choice%==4 goto BtruncMessage
if /i %choice%==5 goto BtruncSetting
if /i %choice%==6 goto BtruncSwitch
if /i %choice%==7 goto Camera
if /i %choice%==8 goto WLAN1
if /i %choice%==9 goto WLAN2
if /i %choice%==10 goto BT1
if /i %choice%==11 goto BT2
if /i %choice%==12 goto PrivateSwitchOne
if /i %choice%==13 goto PrivateSwitchTwo
if /i %choice%==14 goto PublicPrioritySwitch
if /i %choice%==15 goto AirplaneModeSwitch
if /i %choice%==16 goto AirplaneMode
if /i %choice%==17 goto CellurarData1
if /i %choice%==18 goto CellurarData2
if /i %choice%==19 goto OnOff
echo 输入无效请重新输入.搜索
rem 确认用户选择的用例,自动执行对应的脚本
:WLAN1
set /p count=请输入要循环的次数:
echo "test is: %count%"
for /l %%i in (1,1,%count%) do (
@echo **8. 用例8:WLAN 1
adb shell uiautomator runtest hh260Auto.jar --nohup -c hh260.dsy.WLAN1
)
pause
set /p choice=请输入要执行用例序号:
if /i %choice%==1 goto FastGrout
if /i %choice%==2 goto PrivateContact
if /i %choice%==3 goto DeleteContacts
if /i %choice%==4 goto BtruncMessage
if /i %choice%==5 goto BtruncSetting
if /i %choice%==6 goto BtruncSwitch
if /i %choice%==7 goto Camera
if /i %choice%==8 goto WLAN1
if /i %choice%==9 goto WLAN2
if /i %choice%==10 goto BT1
if /i %choice%==11 goto BT2
if /i %choice%==12 goto PrivateSwitchOne
if /i %choice%==13 goto PrivateSwitchTwo
if /i %choice%==14 goto PublicPrioritySwitch
if /i %choice%==15 goto AirplaneModeSwitch
if /i %choice%==16 goto AirplaneMode
if /i %choice%==17 goto CellurarData1
if /i %choice%==18 goto CellurarData2
if /i %choice%==19 goto OnOff
echo 输入无效请重新输入.搜索
rem 确认用户选择的用例,自动执行对应的脚本
:WLAN2
set /p count=请输入要循环的次数:
echo "test is: %count%"
for /l %%i in (1,1,%count%) do (
@echo **9. 用例9:WLAN 2
adb shell uiautomator runtest hh260Auto.jar --nohup -c hh260.dsy.WLAN2
)
pause
set /p choice=请输入要执行用例序号:
if /i %choice%==1 goto FastGrout
if /i %choice%==2 goto PrivateContact
if /i %choice%==3 goto DeleteContacts
if /i %choice%==4 goto BtruncMessage
if /i %choice%==5 goto BtruncSetting
if /i %choice%==6 goto BtruncSwitch
if /i %choice%==7 goto Camera
if /i %choice%==8 goto WLAN1
if /i %choice%==9 goto WLAN2
if /i %choice%==10 goto BT1
if /i %choice%==11 goto BT2
if /i %choice%==12 goto PrivateSwitchOne
if /i %choice%==13 goto PrivateSwitchTwo
if /i %choice%==14 goto PublicPrioritySwitch
if /i %choice%==15 goto AirplaneModeSwitch
if /i %choice%==16 goto AirplaneMode
if /i %choice%==17 goto CellurarData1
if /i %choice%==18 goto CellurarData2
if /i %choice%==19 goto OnOff
echo 输入无效请重新输入.搜索
rem 确认用户选择的用例,自动执行对应的脚本
:BT1
set /p count=请输入要循环的次数:
echo "test is: %count%"
for /l %%i in (1,1,%count%) do (
@echo **10.用例10:蓝牙 1
adb shell uiautomator runtest hh260Auto.jar --nohup -c hh260.dsy.BT1
)
pause
set /p choice=请输入要执行用例序号:
if /i %choice%==1 goto FastGrout
if /i %choice%==2 goto PrivateContact
if /i %choice%==3 goto DeleteContacts
if /i %choice%==4 goto BtruncMessage
if /i %choice%==5 goto BtruncSetting
if /i %choice%==6 goto BtruncSwitch
if /i %choice%==7 goto Camera
if /i %choice%==8 goto WLAN1
if /i %choice%==9 goto WLAN2
if /i %choice%==10 goto BT1
if /i %choice%==11 goto BT2
if /i %choice%==12 goto PrivateSwitchOne
if /i %choice%==13 goto PrivateSwitchTwo
if /i %choice%==14 goto PublicPrioritySwitch
if /i %choice%==15 goto AirplaneModeSwitch
if /i %choice%==16 goto AirplaneMode
if /i %choice%==17 goto CellurarData1
if /i %choice%==18 goto CellurarData2
if /i %choice%==19 goto OnOff
echo 输入无效请重新输入.搜索
rem 确认用户选择的用例,自动执行对应的脚本
:BT2
set /p count=请输入要循环的次数:
echo "test is: %count%"
for /l %%i in (1,1,%count%) do (
@echo **11.用例11:蓝牙 2
adb shell uiautomator runtest hh260Auto.jar --nohup -c hh260.dsy.BT2
)
pause
set /p choice=请输入要执行用例序号:
if /i %choice%==1 goto FastGrout
if /i %choice%==2 goto PrivateContact
if /i %choice%==3 goto DeleteContacts
if /i %choice%==4 goto BtruncMessage
if /i %choice%==5 goto BtruncSetting
if /i %choice%==6 goto BtruncSwitch
if /i %choice%==7 goto Camera
if /i %choice%==8 goto WLAN1
if /i %choice%==9 goto WLAN2
if /i %choice%==10 goto BT1
if /i %choice%==11 goto BT2
if /i %choice%==12 goto PrivateSwitchOne
if /i %choice%==13 goto PrivateSwitchTwo
if /i %choice%==14 goto PublicPrioritySwitch
if /i %choice%==15 goto AirplaneModeSwitch
if /i %choice%==16 goto AirplaneMode
if /i %choice%==17 goto CellurarData1
if /i %choice%==18 goto CellurarData2
if /i %choice%==19 goto OnOff
echo 输入无效请重新输入.搜索
rem 确认用户选择的用例,自动执行对应的脚本
:PrivateSwitchOne
set /p count=请输入要循环的次数:
echo "test is: %count%"
for /l %%i in (1,1,%count%) do (
@echo **12.用例12:专网开关 1
adb shell uiautomator runtest hh260Auto.jar --nohup -c hh260.dsy.PrivateSwitchOne
)
pause
set /p choice=请输入要执行用例序号:
if /i %choice%==1 goto FastGrout
if /i %choice%==2 goto PrivateContact
if /i %choice%==3 goto DeleteContacts
if /i %choice%==4 goto BtruncMessage
if /i %choice%==5 goto BtruncSetting
if /i %choice%==6 goto BtruncSwitch
if /i %choice%==7 goto Camera
if /i %choice%==8 goto WLAN1
if /i %choice%==9 goto WLAN2
if /i %choice%==10 goto BT1
if /i %choice%==11 goto BT2
if /i %choice%==12 goto PrivateSwitchOne
if /i %choice%==13 goto PrivateSwitchTwo
if /i %choice%==14 goto PublicPrioritySwitch
if /i %choice%==15 goto AirplaneModeSwitch
if /i %choice%==16 goto AirplaneMode
if /i %choice%==17 goto CellurarData1
if /i %choice%==18 goto CellurarData2
if /i %choice%==19 goto OnOff
echo 输入无效请重新输入.搜索
rem 确认用户选择的用例,自动执行对应的脚本
:PrivateSwitchTwo
set /p count=请输入要循环的次数:
echo "test is: %count%"
for /l %%i in (1,1,%count%) do (
@echo **13.用例13:专网开关 2
adb shell uiautomator runtest hh260Auto.jar --nohup -c hh260.dsy.PrivateSwitchTwo
)
pause
@echo 这条用例必须脱机跑,若想继续执行下面的用例,等待执行后,注意终端端口连接态
adb wait-for-device
set /p choice=请输入要执行用例序号:
if /i %choice%==1 goto FastGrout
if /i %choice%==2 goto PrivateContact
if /i %choice%==3 goto DeleteContacts
if /i %choice%==4 goto BtruncMessage
if /i %choice%==5 goto BtruncSetting
if /i %choice%==6 goto BtruncSwitch
if /i %choice%==7 goto Camera
if /i %choice%==8 goto WLAN1
if /i %choice%==9 goto WLAN2
if /i %choice%==10 goto BT1
if /i %choice%==11 goto BT2
if /i %choice%==12 goto PrivateSwitchOne
if /i %choice%==13 goto PrivateSwitchTwo
if /i %choice%==14 goto PublicPrioritySwitch
if /i %choice%==15 goto AirplaneModeSwitch
if /i %choice%==16 goto AirplaneMode
if /i %choice%==17 goto CellurarData1
if /i %choice%==18 goto CellurarData2
if /i %choice%==19 goto OnOff
echo 输入无效请重新输入.搜索
rem 确认用户选择的用例,自动执行对应的脚本
:PublicPrioritySwitch
set /p count=请输入要循环的次数:
echo "test is: %count%"
for /l %%i in (1,1,%count%) do (
@echo **14.用例14:数据业务公网优先开关
adb shell uiautomator runtest hh260Auto.jar --nohup -c hh260.dsy.PublicPrioritySwitch
)
pause
set /p choice=请输入要执行用例序号:
if /i %choice%==1 goto FastGrout
if /i %choice%==2 goto PrivateContact
if /i %choice%==3 goto DeleteContacts
if /i %choice%==4 goto BtruncMessage
if /i %choice%==5 goto BtruncSetting
if /i %choice%==6 goto BtruncSwitch
if /i %choice%==7 goto Camera
if /i %choice%==8 goto WLAN1
if /i %choice%==9 goto WLAN2
if /i %choice%==10 goto BT1
if /i %choice%==11 goto BT2
if /i %choice%==12 goto PrivateSwitchOne
if /i %choice%==13 goto PrivateSwitchTwo
if /i %choice%==14 goto PublicPrioritySwitch
if /i %choice%==15 goto AirplaneModeSwitch
if /i %choice%==16 goto AirplaneMode
if /i %choice%==17 goto CellurarData1
if /i %choice%==18 goto CellurarData2
if /i %choice%==19 goto OnOff
echo 输入无效请重新输入.搜索
rem 确认用户选择的用例,自动执行对应的脚本
:AirplaneModeSwitch
set /p count=请输入要循环的次数:
echo "test is: %count%"
for /l %%i in (1,1,%count%) do (
@echo **15.用例15:飞行模式 1
adb shell uiautomator runtest hh260Auto.jar --nohup -c hh260.dsy.AirplaneModeSwitch
)
pause
set /p choice=请输入要执行用例序号:
if /i %choice%==1 goto FastGrout
if /i %choice%==2 goto PrivateContact
if /i %choice%==3 goto DeleteContacts
if /i %choice%==4 goto BtruncMessage
if /i %choice%==5 goto BtruncSetting
if /i %choice%==6 goto BtruncSwitch
if /i %choice%==7 goto Camera
if /i %choice%==8 goto WLAN1
if /i %choice%==9 goto WLAN2
if /i %choice%==10 goto BT1
if /i %choice%==11 goto BT2
if /i %choice%==12 goto PrivateSwitchOne
if /i %choice%==13 goto PrivateSwitchTwo
if /i %choice%==14 goto PublicPrioritySwitch
if /i %choice%==15 goto AirplaneModeSwitch
if /i %choice%==16 goto AirplaneMode
if /i %choice%==17 goto CellurarData1
if /i %choice%==18 goto CellurarData2
if /i %choice%==19 goto OnOff
echo 输入无效请重新输入.搜索
rem 确认用户选择的用例,自动执行对应的脚本
:AirplaneMode
set /p count=请输入要循环的次数:
echo "test is: %count%"
for /l %%i in (1,1,%count%) do (
@echo **16.用例16:飞行模式 2
adb shell uiautomator runtest hh260Auto.jar --nohup -c hh260.dsy.AirplaneMode
)
pause
set /p choice=请输入要执行用例序号:
if /i %choice%==1 goto FastGrout
if /i %choice%==2 goto PrivateContact
if /i %choice%==3 goto DeleteContacts
if /i %choice%==4 goto BtruncMessage
if /i %choice%==5 goto BtruncSetting
if /i %choice%==6 goto BtruncSwitch
if /i %choice%==7 goto Camera
if /i %choice%==8 goto WLAN1
if /i %choice%==9 goto WLAN2
if /i %choice%==10 goto BT1
if /i %choice%==11 goto BT2
if /i %choice%==12 goto PrivateSwitchOne
if /i %choice%==13 goto PrivateSwitchTwo
if /i %choice%==14 goto PublicPrioritySwitch
if /i %choice%==15 goto AirplaneModeSwitch
if /i %choice%==16 goto AirplaneMode
if /i %choice%==17 goto CellurarData1
if /i %choice%==18 goto CellurarData2
if /i %choice%==19 goto OnOff
echo 输入无效请重新输入.搜索
rem 确认用户选择的用例,自动执行对应的脚本
:CellurarData1
set /p count=请输入要循环的次数:
echo "test is: %count%"
for /l %%i in (1,1,%count%) do (
@echo **17.用例17:移动数据网络 1
adb shell uiautomator runtest hh260Auto.jar --nohup -c hh260.dsy.CellurarData1
pause
)
pause
@echo 这条用例必须脱机跑,若想继续执行下面的用例,等待执行后,注意终端端口连接态
adb wait-for-device
set /p choice=请输入要执行用例序号:
if /i %choice%==1 goto FastGrout
if /i %choice%==2 goto PrivateContact
if /i %choice%==3 goto DeleteContacts
if /i %choice%==4 goto BtruncMessage
if /i %choice%==5 goto BtruncSetting
if /i %choice%==6 goto BtruncSwitch
if /i %choice%==7 goto Camera
if /i %choice%==8 goto WLAN1
if /i %choice%==9 goto WLAN2
if /i %choice%==10 goto BT1
if /i %choice%==11 goto BT2
if /i %choice%==12 goto PrivateSwitchOne
if /i %choice%==13 goto PrivateSwitchTwo
if /i %choice%==14 goto PublicPrioritySwitch
if /i %choice%==15 goto AirplaneModeSwitch
if /i %choice%==16 goto AirplaneMode
if /i %choice%==17 goto CellurarData1
if /i %choice%==18 goto CellurarData2
if /i %choice%==19 goto OnOff
echo 输入无效请重新输入.搜索
rem 确认用户选择的用例,自动执行对应的脚本
:CellurarData2
set /p count=请输入要循环的次数:
echo "test is: %count%"
for /l %%i in (1,1,%count%) do (
@echo **18.用例18:移动数据网络 2
adb shell uiautomator runtest hh260Auto.jar --nohup -c hh260.dsy.CellurarData2
)
pause
@echo 这条用例必须脱机跑,若想继续执行下面的用例,等待执行后,注意终端端口连接态
adb wait-for-device
set /p choice=请输入要执行用例序号:
if /i %choice%==1 goto FastGrout
if /i %choice%==2 goto PrivateContact
if /i %choice%==3 goto DeleteContacts
if /i %choice%==4 goto BtruncMessage
if /i %choice%==5 goto BtruncSetting
if /i %choice%==6 goto BtruncSwitch
if /i %choice%==7 goto Camera
if /i %choice%==8 goto WLAN1
if /i %choice%==9 goto WLAN2
if /i %choice%==10 goto BT1
if /i %choice%==11 goto BT2
if /i %choice%==12 goto PrivateSwitchOne
if /i %choice%==13 goto PrivateSwitchTwo
if /i %choice%==14 goto PublicPrioritySwitch
if /i %choice%==15 goto AirplaneModeSwitch
if /i %choice%==16 goto AirplaneMode
if /i %choice%==17 goto CellurarData1
if /i %choice%==18 goto CellurarData2
if /i %choice%==19 goto OnOff
echo 输入无效请重新输入.搜索
rem 确认用户选择的用例,自动执行对应的脚本
:OnOff
@echo *请确定你电脑中安装了Python环境,可以运行py脚本文件*
set /p count=请输入要循环的次数:
echo "test is: %count%"
for /l %%i in (1,1,%count%) do (
@echo **19.用例19:自动开关机
python D:\hh260AutoTestJARv0.01\power on and off.py
)
pause
@echo 这条用例必须脱机跑,若想继续执行下面的用例,等待执行后,注意终端端口连接态
set /p choice=请输入要执行用例序号:
if /i %choice%==1 goto FastGrout
if /i %choice%==2 goto PrivateContact
if /i %choice%==3 goto DeleteContacts
if /i %choice%==4 goto BtruncMessage
if /i %choice%==5 goto BtruncSetting
if /i %choice%==6 goto BtruncSwitch
if /i %choice%==7 goto Camera
if /i %choice%==8 goto WLAN1
if /i %choice%==9 goto WLAN2
if /i %choice%==10 goto BT1
if /i %choice%==11 goto BT2
if /i %choice%==12 goto PrivateSwitchOne
if /i %choice%==13 goto PrivateSwitchTwo
if /i %choice%==14 goto PublicPrioritySwitch
if /i %choice%==15 goto AirplaneModeSwitch
if /i %choice%==16 goto AirplaneMode
if /i %choice%==17 goto CellurarData1
if /i %choice%==18 goto CellurarData2
if /i %choice%==19 goto OnOff
echo 输入无效请重新输入.搜索
rem 确认用户选择的用例,自动执行对应的脚本
pause