稳定性测试—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 个动作的快速动作插入,具备根据不同业务线的需求进行深度定制的能力。

相关推荐
CSXB999 小时前
一、Python(介绍、环境搭建)
开发语言·python·测试工具·集成测试
Defry9 小时前
Selenium WebDriver和Chrome对照表
chrome·selenium·测试工具
99乘法口诀万物皆可变1 天前
CANoe_TestModule截图功能TestReportAddWindowCapture
测试工具
99乘法口诀万物皆可变1 天前
ODX相关基础知识普及
测试工具·测试用例
今天好像不上班1 天前
软件验证与确认实验二-单元测试
测试工具·算法
wdxylb2 天前
Pyhton爬虫使用Selenium实现浏览器自动化操作抓取网页
爬虫·selenium·测试工具
码力码力我爱你3 天前
C++ WebDriver扩展
c++·selenium·测试工具
土小帽软件测试4 天前
fiddler抓包16_自动重定向(mock数据)
测试工具·fiddler·抓包·软件测试学习
Kakaxiii4 天前
UMLS的api调用(Postman)
人工智能·深度学习·测试工具·自然语言处理·postman