monkey参数

约束类参数
1.包约束
adb shell monkey -p 包名 200
如果想在两个包之间约束 就多加一个 -p 包名
如 adb shell monkey -p 包名 -p 包名 200
Activity约束
adb shell monkey -c 操作类别 100
调试类参数
1.应用崩溃后继续发送事件
adb shell monkey --ignore-crashes 100
在设置此选项后,当应用崩溃或发生失控异常时,monkey将继续运行直到计数完成。如果不设置此选项。monkey遇上述的
崩溃或异常将停止异常
2.超时错误继续发送事件
adb shell monkey --ignore-timeouts 100
如果你希望monkey在任何超时错误发生后继续发生事件,则需要用到–ignore-timeouts命令,如果不设置此选项,monkey遇到此类超时对话框将停止运行
3.应用程序权限错误发生后继续发生事件
adb shell monkey --ignore-security-exceptions
当发生权限错误的时候 将继续运行 如果不设置此选项 就会停止运行
监控本地程序崩溃
adb shell monkey --monitor-native-crashes 100
原文地址:https://www.cnblogs.com/limou956259/p/10830492.html