android monkey自动遍历测试
https://blog.****.net/weixin_45912307/article/details/109393436
1. monkey命令
-
adb shell monkey -help
查看帮助命令 -
adb shell monkey n
对所有包随机操作 -
adb shell monkey -p com.android.settings n
对指定包 -
adb shell monkey -p com.android.settings -s 20 80
时间种子 -
adb shell monkey -p com.android.settings -vv 20 80
详细日志 - 时间延迟(5s 延时)
adb shell monkey -p com.android.settings --throttle 5000 100
- 事件百分比
adb shell monkey -p com.android.settings --pct-toch 10 1000
2. 常用事件--pct-touch
触摸事件,如点击--pct-motion
动作时间,如滑动(直线)--pct-trackball
轨迹事件,如移动+点击,曲线滑动--pct-majornav
主要导航事件,如回退按钮、菜单按钮