maxim - Android UI压力测试
项目介绍
- 项目地址:https://github.com/zhangzhao4444/Maxim
- 与monkey对比优势:
- 快
- 稳:只进行有意义的操作,防误点状态栏,不会乱断网、卸载应用
- 支持脱机运行,错误日志可以记录到手机本地
- 支持自定义:控件黑白名单,自定义操作步骤,控件操作优先级
- 截图支持
使用方法
-
将两个jar文件push到根目录 maxim.zip
adb push framework.jar /sdcardadb push monkey.jar /sdcard -
脱机运行方法(开始执行后,手机可以不连接电脑,错误日志记录在手机存储卡上)
adb shell"CLASSPATH=/sdcard/monkey.jar:/sdcard/framework.jar exec app_process /system/bin tv.panda.test.monkey.Monkey -p com.hs.news --uiautomatormix --running-minutes 2880 -v --throttle 500 >/sdcard/monkeyout.txt 2>/sdcard/monkeyerr.txt &"参数含义:-p com.hs.news:指定要运行的包名,需要替换成你在测试的应用--uiautomatormix:遍历方式,其它两个不稳定,可以默认用这个--running-minutes2880:指定运行时间,单位是分钟,2880就是2天-v:log输出级别--throttle500:每个动作之间间隔,如果不加会以尽可能快的速度发送指令。为了模拟正常操作,一般设置在300以上2>/sdcard/monkeyerr.txt:如果运行过程中出现崩溃卡死,错误文件会保存在这里。 -
非脱机运行方法(开始执行后,手机必须连接电脑,错误日志记录在电脑上)
adb shell CLASSPATH=/sdcard/monkey.jar:/sdcard/framework.jar exec app_process /system/bin tv.panda.test.monkey.Monkey -p com.hs.news --uiautomatormix --running-minutes60-v -v > D:\test\monkey.log2>D:\test\monkeyerr.log -
运行结束后,查看错误文件中是否有报错信息,手机上:adb pull /sdcard/monkeyerr.txt,电脑上:D:\test\monkeyerr.log
- 在结果文件中,搜索crash,not responding,和你测试的包名,找出崩溃卡死等信息
浙公网安备 33010602011771号