adb shell monkey   -v 500  >F:/monkeylog2018.txt    -P表示包名   -V表示输出日志的详细级别  一个-V表示一级 递增  >输出日志的目录
 
adb shell monkey -p com.htc.Weather –s 10 100       -s 10 前后两条命令相同,那么其随机的内容也是相同的,这样可以在对比测试的时候用到
 
adb shell monkey -p com.huawei.Weather –throttle 3000 100    每次操作都延迟3秒 随机事件100次 这样可以给app留有响应时间,连网时间,加载时间
 
--ignore-crashes adb shell monkey -p com.huawei.Weather --ignore-crashes 1000   忽略事件  可以忽略崩溃测试过程中即使程序崩溃,Monkey依然会继续发送事件直到事件数目达到1000为止
 
--ignore-timeouts     adb shell monkey -p com.huawei.Weather --ignore-timeouts 1000 忽略超时  如果程序发生anr超时错误  仍然继续运行
 
--ignore-security-exceptions   adb shell monkey -p com.huawei.Weather --ignore-security-exceptions 1000       即使应用程序发生许可错误,Monkey依然会发送事件,直到事件计数完成
 
--kill-process-after-error   发生错误后直接杀掉进程:用于指定当应用程序发生错误时,是否停止其运行。如果指定此参数,当应用程序发生错误时,应用程序停止运行并保持在当前状态(注意:应用程序仅是静止在发生错误时的状态,系统并不会结束该应用程序的进程
 
--monitor-native-crashes adb shell monkey -p com.huawei.Weather --kill-process-after-error  --monitor-native-crashes 1000 跟踪本地方法崩溃问题:用于指定是否监视并报告应用程序发生崩溃的本地代码,
 
指定事件百分比:
用于指定每种类别事件的数目百分比(在Monkey事件序列中,该类事件数目占总事件数目的百分比),虽然事件是随机的,但是你可以指定其中某种动作的比例,根据app的特点而进行设置,某些app滑动多,某些app点击多,这样可以更贴近app应用场景的设置随机事件进行测试
 
--pct-{+事件类别} {+事件类别百分比}:
 
--pct-touch {+百分比}:触摸事件:adb shell monkey -p com.huawei.Weather --pct-touch 10 1000
 
--pct-motion {+百分比}:动作事件:adb shell monkey -p com.huawei.Weather --pct-motion10 1000
 
--pct-trackball {+百分比}:轨迹事件:adb shell monkey -p com.huawei.Weather --pct-trackball 10 1000
 
--pct-nav {+百分比}:基本导航:adb shell monkey -p com.huawei.Weather --pct-nav 10 1000
 
--pct-majornav {+百分比}:主要导航:adb shell monkey -p com.huawei.Weather --pct-majornav 10 1000
 
--pct-syskeys {+百分比}:系统按键:adb shell monkey -p com.huawei.Weather --pct-syskeys 10 1000
 
--pct-appswitch {+百分比}:启动activity(日志里见过这个switch吧):adb shell monkey -p com.huawei.Weather --pct-appswitch  10 1000
 
--pct-anyevent {+百分比}:其他事件:
 
指定单个类型事件的百分比:
 
adb shell monkey -p com.huawei.Weather --pct -anyevent 20  1000
 
指定多个类型事件的百分比:
 
adb shell monkey -p com.huawei.Weather --pct-anyevent 30  --pct-appswitch 30   1000
 
注意:各事件类型的百分比总数不能超过100%
 
防止monkey点击状态栏
adb shell settings put global policy_control immersive.full=*

Monkey基本常用命令整理的更多相关文章

  1. 【linux】---常用命令整理

    linux常用命令整理 一.ls命令 就是list的缩写,通过ls 命令不仅可以查看linux文件夹包含的文件,而且可以查看文件权限(包括目录.文件夹.文件权限)查看目录信息等等 常用参数搭配: l ...

  2. Tomcat性能优化及常用命令整理

    1汤姆猫性能优化 1.1连接参数 1.1.1默认连接配置 默认连接器采用阻塞式 IO,默认最大线程数为200,配置如下: <Connector port="8080" pro ...

  3. linux 服务器常用命令整理

    linux 服务器常用命令整理 目录 网络分析 - tcpdump \ telnet \ (netstat \ ss \ lsof) \ nload 网络传输 - scp \ rsync \ (rz ...

  4. (小组)Git 常用命令整理

    Git 常用命令整理 取得Git仓库 初始化一个版本仓库 git init Clone远程版本库 git clone git@xbc.me:wordpress.git 添加远程版本库origin,语法 ...

  5. salt 常用命令整理

    salt 常用命令整理 ***********模块*********** 查看模块列表module salt 'minion' sys.list_modules 查看指定module的function ...

  6. Dos常用命令整理

    Dos常用命令整理 打开cmd的方法 开始菜单 -> 系统 -> 命令提示符 组合键Win+R打开运行 -> 输入cmd 在任意文件夹下Shift+鼠标右键 -> 在此处打开命 ...

  7. npm常用命令整理

    npm是一个NodeJS包管理跟分发工具,已经成为了非官方的发布node模块(包)的标准.它可以帮助我们解决代码部署上的一些问题,将开发者从繁琐的包管理工作中(版本.依赖等)解放出来,更加专注于功能上 ...

  8. Linux上常用命令整理(一)—— cat

    近几个月刚从windows上转过来,开始慢慢熟悉linux,先不撕比到底哪个更好,首先要怀着相互借鉴的精神去了解各个平台. Linux上做开发,除去使用文本编辑器做开发的大神之外,大家(包括我这种菜鸟 ...

  9. Conda/Miniconda/Anaconda 常用命令整理及介绍

    作者:HELO 出处:http://www.cnblogs.com/HELO-K 欢迎转载, 转载时请保留此声明, 谢谢! 在这里整理一份全一点的 Conda 常用命令, 方便大家日常使用时参考, 一 ...

随机推荐

  1. HDU2899 Strange fuction 【二分】

    Strange fuction Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) ...

  2. Java时间转换

    package com.fh.util; import java.sql.Timestamp; import java.text.DateFormat; import java.text.ParseE ...

  3. PL/SQL Developer使用技巧、快捷键(转发)

    转发自:https://www.cnblogs.com/linjiqin/archive/2013/06/24/3152538.html PL/SQL Developer使用技巧.快捷键 1.类SQL ...

  4. Ext.tree.Panel实现单选,多选

    Extjs var productCategoryTreeLookUpFn = function(callback) { var productCategoryLookUpWindow; var pr ...

  5. 学习笔记——WPF

    WPF,Windows Presentation Foundation.主要作用在于界面呈现,但Presentation却是介绍的意思. WPF采用XAML + 代码相结合的方式,感觉跟ASP.NET ...

  6. tflearn中计算混淆矩阵方法——需要经过一步转换

    def do_rnn_wordbag(trainX, testX, trainY, testY): y_test=testY #trainX = pad_sequences(trainX, maxle ...

  7. bzoj3211: 花神游历各国(线段树) 同codevs2492

    3211: 花神游历各国 Time Limit: 5 Sec  Memory Limit: 128 MBSubmit: 3628  Solved: 1326[Submit][Status][Discu ...

  8. 后台传list,前台接受

    @RequestMapping("/page1") public ModelAndView editSharing(Integer id) { ModelAndView mav=n ...

  9. C# 处理oralce 时间

     addWorkSql.Append("to_date(' " + DateTime.Now.ToString("yyyy-MM-dd HH:ss:mm") + ...

  10. Java多线程技术-Lock/Condition

    在java1.5中Lock对象来实现同步的效果,而且使用上更方便. 使用ReentrantLock实现同步 public class MyService { private Lock lock = n ...