
adb devices 查看有无连接的设备adb shell monkey [参数] {随机发送事件数}adb shell monkey 100-v :用于指定反馈信息级别,总共分 3 个级别adb shell monkey -v -v -v 10-s <seednumber>:用于指定伪随机数生成器的 seed(种子)值adb shell monkey -s 123 10--throttle <milliseconds>:每个事件结束后的间隔时间adb shell monkey --throttle 300 10-p:用于约束限制,用此参数指定一个或多个包adb shell monkey -p com.android.browser 10--ignore-crashes:忽略崩溃--ignore-timeouts:忽略超时--ignore-security-exceptions:忽略安全异常--ignore-native-crashes:忽略本地代码导致的崩溃异常--monitor-native-crashes:跟踪本地方法的崩溃问题--pct-touch:触摸事件--pct-motion:滑动事件--pct-appswitch:activity 之间的切换--pct-pinchzoom:缩放事件--pct-rotation:屏幕旋转事件--pct-flip:键盘事件--pct-anyevent:任意事件adb shell dumpsys activity | grep mFocusedActivity需要跑的时间/命令之间的时间间隔=要执行的次数 8*60*60*1000/300 = 96000-s 12345--ignore-crashes --ignore-timeouts --ignore-security-exceptions>adb shell monkey -p com.xueqiu.android --pct-touch 30 --pct-motion 30 --pct-syskeys 10 --pct-appswitch 20 --pct-flip 5 --pct-anyevent 5 -s 12345 --throttle 300 --ignore-crashes --ignore-timeouts --ignore-security-exceptions -v -v -v 200 > monkey_log.txt原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。