当前位置:网站首页>新知识:Monkey 改进版之 App Crawler
新知识:Monkey 改进版之 App Crawler
2022-06-12 06:49:00 【软件测试小小白】
►►►
原生Monkey
大家知道Monkey是Android平台上进行压力稳定性测试的工具,通过Monkey可以模拟用户触摸屏幕、滑动、按键等伪随机用户事件来对设备上的程序进行压力测试。而原生的Android Monkey存在一些缺陷:
事件太过于随机,测试有效性大打折扣
由于Monkey主要发送一些随机事件来进行测试,测试过程中的事件操作不受控制,大部分操作是无效的(比如点击的是空白区域、在不能滑动的页面进行滑动等等)。对App页面内的控件覆盖率不佳
也是因为随机性这一特点,不能保证App页面的所有控件都能得到有效覆盖测试。有概率跳出测试
点击到通知栏或者状态栏,就会跳转到其他的页面,从而中断当前App的测试。
►►►
Google App crawler
Google官方推出的App遍历工具,相比Monkey基于伪随机的事件,App Crawler是基于控件的遍历,可以更好的去遍历App的功能。
官方网址:
https://developer.android.google.cn/training/testing/crawler
使用步骤:
1
安装JDK与Android SDK
JDK与SDK的安装可以参考如下文章:
2
下载App Crawler并解压

3
执行以下命令启动测试:
java -jar crawl_launcher.jar --apk-file--app-package-name--android-sdkApp Crawler运行完成后会生成 crawl_output 目录,里面有遍历的每一步的截图和日志信息。
相关命令参数:
参数 | 描述 |
--android-sdk | 指定Android SDK的路径,这是一个必需的标记。 |
--apk-file | 指定应用 APK 的路径,应用抓取工具随后会对其进行安装和抓取,这是一个必需的标记(如果未指定--app-package-name)。 |
--app-package-name | 指定应用的软件包名称。当您的应用已安装在设备上且无需重新安装时,使用此选项。这是一个必需的标记(如果未指定--apk-file)。 |
--key-store | 指定用于为您的应用和抓取工具 APK 签名的密钥库的路径。当您的应用需要特定签名才能正常运行时,使用此选项。 |
--key-store-password | 指定您为--key-store选项提供的密钥库的密码。这是一个必需的标记(如果已指定 --key-store)。 |
--timeout-sec | 指定抓取的超时(以秒为单位)。 如果未指定,抓取会在 60 秒后停止。 |
►►►
实测效果
原生Monkey:

Google App Crawler:

福利

边栏推荐
- C language pointer
- I met 15 people recently and found that I couldn't answer the basic question of this test
- Are you still using like+% for MySQL fuzzy query?
- When SQL server2019 is installed, the next step cannot be performed. How to solve this problem?
- “我被大厂裁员了”
- Apache poi 导入导出Excel文件
- Leetcode: offer 60 Points of N dice [math + level DP + cumulative contribution]
- 使用 ms17-010 永恒之蓝漏洞对 win7 进行渗透及建立永久后门
- 六月集训 第六日——滑动窗口
- (14) The software version number is displayed in the flash window of blender source code analysis
猜你喜欢
![Leetcode: Sword finger offer 66 Build product array [application of pre and post infix]](/img/de/cd98d4d86017a13ec4172ba3054e99.png)
Leetcode: Sword finger offer 66 Build product array [application of pre and post infix]

Tomato learning notes -seq2seq

5 ROS simulation modeling (4-navigation navigation simulation)

leetcode:890. 查找和替换模式【两个dict记录双射(set)】

【数据聚类】本专栏中涉及数据集、可视化及注意事项

Are you still using like+% for MySQL fuzzy query?
![Leetcode: Sword finger offer 67 Convert string to integer [simulation + segmentation + discussion]](/img/32/16751c0a783cc3121eddfe265e2f4f.png)
Leetcode: Sword finger offer 67 Convert string to integer [simulation + segmentation + discussion]
![[data clustering] data set, visualization and precautions are involved in this column](/img/46/0b4918ef9c9301fbc374913fe806de.png)
[data clustering] data set, visualization and precautions are involved in this column

SQL injection based on error reporting

【图像检测】基于深度差分和PCANet实现SAR图像变化检测附matlab代码
随机推荐
[data clustering] data set, visualization and precautions are involved in this column
XML special character escape
Codeforces Round #793 (Div. 2) A B C
ConVIRT论文详解(医疗图片)
Network packet loss troubleshooting
2021 RoboCom 世界机器人开发者大赛-本科组(初赛)
VSCode常用插件
LeetCode-1587. Bank account summary II
Database syntax related problems, solve a correct syntax
The second day of June training - string
Redis supports data structure types
Torch models trained in higher versions report errors in lower versions
LeetCode-1078. Bigram participle
leetcode:剑指 Offer 60. n个骰子的点数【数学 + 层次dp + 累计贡献】
esp32 hosted
VSCode常用插件
六月集训 第二天——字符串
Leetcode: Sword finger offer 63 Maximum profit of stock [record prefix minimum and or no brain segment tree]
8. form label
LeetCode-1303. Team size