monkey adb shell monkey -p package 1000
-s 指定序列
adb shell monkey -s 2000 -p com.lemon.lemonban -s 200 1000
序列值随便,下一次要和上一次一致,就能重复上一次的执行顺序
-v 100 monkey本身产生的日志
-v -v -v 最详细的日志
adb shell monkey -s 200 -p com.lemon.lemonban
-v -v -v 500>G:\安卓UI自动化\mokey help\log.txt 20000
--throttle 延迟
--throttle --randomize-throttle
黑名单:
adb pull whitelist.txt /data/local/tmp 白名单发送到手机
adb shell monkey --pkg-whitelist /data/local/temp/whitelist.txt
--blacklist
百分比事件:
--pct-rotion 100
usage: monkey [-p ALLOWED_PACKAGE [-p ALLOWED_PACKAGE] ...]
[-c MAIN_CATEGORY [-c MAIN_CATEGORY] ...]
[--ignore-crashes] [--ignore-timeouts]
[--ignore-security-exceptions]
[--monitor-native-crashes] [--ignore-native-crashes]
[--kill-process-after-error] [--hprof]
[--pct-touch PERCENT] [--pct-motion PERCENT]
[--pct-trackball PERCENT] [--pct-syskeys PERCENT]
[--pct-nav PERCENT] [--pct-majornav PERCENT]
[--pct-appswitch PERCENT] [--pct-flip PERCENT]
[--pct-anyevent PERCENT] [--pct-pinchzoom PERCENT]
[--pkg-blacklist-file PACKAGE_BLACKLIST_FILE]
[--pkg-whitelist-file PACKAGE_WHITELIST_FILE]
[--wait-dbg] [--dbg-no-events]
[--setup scriptfile] [-f scriptfile [-f scriptfile] ...]
[--port port]
[-s SEED] [-v [-v] ...]
[--throttle MILLISEC] [--randomize-throttle]
[--profile-wait MILLISEC]
[--device-sleep-time MILLISEC]
[--randomize-script]
[--script-log]
[--bugreport]
[--periodic-bugreport]
COUNT
原文:https://www.cnblogs.com/wangzhiqiang004/p/12638889.html