事件类参数
1、扫行指定脚本
$ adb shell monkey -f
adb shell monkey -f /mnt/sdcard/test1
2、伪随机数生成种子植
伪随机数生成器的seed值。如果用相同的seed值再次运行monkey,将生成相同的事件序列。
adb shell monkey -p com.bocom.xxhz -s 88 50
【解释】
-s <seed值>
执行事件百分比
adb shell monkey -v -p com.bocom.xxhz 100 50
【解释】
-v:列出详细的进度百分比
100:执行百分比
50:随机事件数
事件标号 | 解释 |
---|---|
0–pct-touch | 触摸事件(屏幕按下、弹起的操作),点击时间百分比 |
1–pct–motion事件 | 手势事件(直线滑动操作) |
2–pct–pinchzoom事件 | 二指缩放事件 |
3–pct–trackball 事件 |