自动化工具 fastmonkey

Android Monkey 二次开发,实现高速点击的 Android Monkey

一、工具介绍:

1、本工具是testhome上 zhangzhao_lenovo开源出来的工具,源码暂时还未开源;

2、论坛地址:https://testerhome.com/topics/11719;

3、Github地址:https://github.com/zhangzhao4444/Maxim

 

二、工具特点:

1、高速点击,每秒10--15个事件;

2、兼容Android 5 6 7 8;

3、防止跳出,可以针对Acticity进行黑白名单控制;

4、防止休眠,休眠时会自动唤醒设备;

5、熔断机制,当一个页面卡主一段时间后自动触发熔断开始自己拉活,防止假死,防止一个地方重复点击;

6、随机自动输入;

7、出现crash或者oor会自动抓取Log并存于/sdcard/crash-dump.log下;

8、支持深度遍历算法;


三、参数介绍:

1、支持Android Momkey原生命令;

2、tv.panda.test.monkey.Monkey 主调入口  无需修改;

3、策略模式

--uiautomatormix 混合模式(70%控件解析随机点击,其余30%按原Monkey事件概率分布)

--pct-uiautomatormix n 可自定义混合模式中控件解析事件概率

--uiautomatordfs DFS深度遍历算法(优化版)(注 Android5不支持dfs)

非以上两种为原始Monkey策略

4、执行时长 --running-minutes 60        执行60分钟monkey

5、场景细粒度控制

--act-whitelist-file  /sdcard/awl.strings 自定义Activity白名单

--act-blacklist-file  /sdcard/awl.strings 自定义Activity黑名单


四、执行步骤:Example:

1、push monkey执行文件到手机sdcard

    adb push monkey.jar /sdcard/

    adb push framework.jar /sdcard/

2、防止Monkey点击状态栏

  adb install monkey-wifi.apk

  adb shell am start -n org.thisisafactory.simiasque/.MyActivity_

  adb shell am broadcast -a org.thisisafactory.simiasque.SET_OVERLAY --ez enable true

3、执行Monkey命令:

 adb shell

 CLASSPATH=/sdcard/monkey.jar:/sdcard/framework.jar exec app_process /system/bin tv.panda.test.monkey.Monkey --throttle 600 -p com.com.com --uiautomatormix --running-minutes 88888 &




 


      



posted @ 2018-04-28 10:31  MC-Blog  阅读(613)  评论(0编辑  收藏  举报