美文网首页
monkey手机稳定性测试脚本

monkey手机稳定性测试脚本

作者: 陈芝麻烂谷子的事 | 来源:发表于2021-02-26 13:15 被阅读0次

常用的完整monkey命令如下:
adb shell monkey -p com.sbban.zn.activity -s 20 -v-v-v --throttle 200 --hprof --ignore-crashes --ignore-timeouts --ignore-security-exceptions --monitor-native-crashes --pct-touch 35 --pct-motion 30 --pct-trackball 35 20000 > F:\Monkey\mmm\monkey001.txt
1.-p指的是报名;

2.-s 代表种子数

3.-v-v-v 代表日志等级

4.--throttle 代表执行操作的延迟时间(毫秒),如果没有指定此参数,两个事物中间会尽最快时间执行

5.--hprof 该选项设置后,将会在monkey事件序列前后立刻生成report,大小为大于5MB,存储在/data/misc

6.--ignore-crashes --ignore-timeouts --ignore-security-exceptions :各种忽略,忽略崩溃、超时、程序错误。

7.--pct-touch 35 --pct-motion 30 --pct-trackball 35 :各种事物的占比 点击、滑动、滚动

8.20000 > F:\Monkey\mmm\monkey001.txt```:共多少个事件,存入哪个文件

9.另外,如果加上 2>&1 代表中间忽略的问题进行操作,& 即使手机断开连接monkey还是会继续执行
adb shell pm list packages|findstr xxx 可以查看某个包名的详细信息。

10.adb shell dumpsys activity | findstr mFocusedActivity 在adb shell中获取已经打开APP的appPackage和appActivity,需要打开APP

相关文章

网友评论

      本文标题:monkey手机稳定性测试脚本

      本文链接:https://www.haomeiwen.com/subject/sxpmfltx.html