稳定性测试—fastboot和monkey区别

一、什么是稳定性测试

稳定性测试是指检验程序在一定时间内能否稳定地运行,在不同的场景下能否正常地工作的过程。主要目的是检测崩溃、内存泄漏、堆栈错误等缺陷。

二、Monkey

1.什么是Monkey

是一个命令行工具,通常在adb安卓调试运行,模拟用户的行为,一般为,点击屏幕,滑动屏幕,back返回,等随机事件对安卓APP来做压力测试

2.怎么实现Monkey稳定性测试

(1)安装adb调试桥

安装adb调试桥一般有两种方式:

第一种是直接安装adb;地址为:SDK 平台工具版本说明 | Android 开发者 | Android Developers

第二种是安装android studio,里面自带调试桥

https://developer.android.com/studio?hl=zh-cn

(2)配置adb运行环境

以mac为例,打开命令行:

打开环境文件:

open .bash_profile

输入配置命令:

export PATH=${PATH}:/Android/sdk/platform-tools(输入安卓sdb/platform-tools路径)

检查配置是否成功:

adb devices

(3)运行adb命令

adb shell "monkey -p 包名 -v -v --throttle 300 --ignore-crashes --ignore-timeouts --monitor-native-crashes 10000000 2>/sdcard/error.txt 1>/sdcard/info.txt"

修复bug后再次带seed校验

adb shell "monkey -s seed -p 包名 -v -v --throttle 300 --ignore-crashes --ignore-timeouts --monitor-native-crashes 10000000 2>/sdcard/error.txt 1>/sdcard/info.txt"

三、Fastboot

1.什么是fastboot

Fastbot 是一种基于模型的测试工具,用于对 GUI 转换进行建模以发现应用程序稳定性问题。它结合了机器学习和强化学习技术,以更智能的方式协助发现。

2.怎么实现fastboot稳定性测试

(1)工具链接

GitHub - bytedance/Fastbot_Android: Fastbot(2.0) is a model-based testing tool for modeling GUI transitions to discover app stability problems

(2)环境配置

安装adb是前提,将项目jar包推送到设备中,以图为例

复制代码
adb push monkey/build/libs/monkeyq.jar /sdcard/monkeyq.jar
adb push fastbot-thirdpart.jar /sdcard/fastbot-thirdpart.jar
adb push libs/* /data/local/tmp/
adb push framework.jar /sdcard/framework.jar
(3)运行命令

adb -s device_vendor_id shell CLASSPATH=/sdcard/monkeyq.jar:/sdcard/framework.jar:/sdcard/fastbot-thirdpart.jar exec app_process /system/bin com.android.commands.monkey.Monkey -p package_name --agent reuseq --running-minutes duration(min) --throttle delay(ms) -v -v

四.工具比对

Monkey:不支持业务行为定制,无法灵活的控制,经常会点到外部的 App 无法回归原测试 App;或者点击到注销和退出,造成无法继续后面的测试;

Fastboot:继承自原始 Monkey,可实现高达每秒 12 个动作的快速动作插入,具备根据不同业务线的需求进行深度定制的能力。

相关推荐
AIZHINAN17 分钟前
如何评价 selenium 自动化测试框架搭建?
selenium·测试工具
WIN赢9 天前
PostMan使用
测试工具·lua·postman
百里图书10 天前
颠覆传统接口测试!用 Streamlit + SQLite + GPT 打造可视化自动化平台
自动化测试·测试开发·接口自动化测试·测试工具·接口测试·测试平台·python编程
网络安全小吗喽10 天前
靶场(二十六)---小白心得&&靶场体会---Readys
服务器·网络·测试工具·网络安全·靶机
天才测试猿11 天前
2025最新软件测试面试题总结【附文档】
自动化测试·软件测试·python·测试工具·面试·职场和发展·测试用例
网络安全小吗喽11 天前
靶场(二十七)---小白心得&&靶场体会---Hawat
网络·测试工具·安全·网络安全·靶场
NLxxxxX11 天前
爬虫获取数据:selenium的应用
开发语言·爬虫·python·selenium·测试工具·numpy·pandas
狂师11 天前
推荐一款全栈工具导航网站!超实用~
测试工具·工具
Lhz32656812 天前
Selenium学习
学习·selenium·测试工具
fei_sun12 天前
【Wireshark】使用过程中遇到的问题
网络·测试工具·wireshark