Android命令Monkey压力测试,详解,安卓面试题pdf下载

包之后,Monkey将只允许系统启动指定的APP。如果不指定包,Monkey将允许系统启动设备中的所有APP。* 指定一个包: adb shell monkey -p com.htc.Weather 100说明:com.htc.Weather为包名,100是事件计数(即让Monkey程序模拟100次随机用户事件)。* 指定多个包:adb shell monkey -p com.htc.Weather –p com.htc.pdfreader  -p com.htc.photo.wi
摘要由CSDN通过智能技术生成

包之后,Monkey将只允许系统启动指定的APP。如果不指定包,Monkey将允许系统启动设备中的所有APP。

* 指定一个包: adb shell monkey -p com.htc.Weather 100

说明:com.htc.Weather为包名,100是事件计数(即让Monkey程序模拟100次随机用户事件)。

* 指定多个包:adb shell monkey -p com.htc.Weather –p com.htc.pdfreader  -p com.htc.photo.widgets 100

* 不指定包:adb shell monkey 100

说明:Monkey随机启动APP并发送100个随机事件。

* 要查看设备中所有的包,在CMD窗口中执行以下命令:

adb shell

#cddata/data

#ls

  1. 参数:  -v

用于指定反馈信息级别(信息级别就是日志的详细程度),总共分3个级别,分别对应的参数如下表所示:

日志级别 Level0

示例 adb shellmonkey -p com.htc.Weather –v 100

说明 缺省值,仅提供启动提示、测试完成和最终结果等少量信息

日志级别 Level 1

示例 adb shellmonkey -p com.htc.Weather –v -v 100

说明  提供较为详细的日志,包括每个发送到Activity的事件信息

日志级别 Level 2

示例 adb shellmonkey -p com.htc.Weather –v

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值