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

相关推荐
Hy行者勇哥6 小时前
用Postman验证IAM Token的实际操作
测试工具·postman
曼诺尔雷迪亚兹13 小时前
Wireshark快速入门--对启动的后端程序进行抓包
网络·测试工具·wireshark
软件测试小仙女15 小时前
AI测试工具Testim——告别自动化测试维护难题
自动化测试·软件测试·人工智能·测试工具·单元测试·集成测试·压力测试
试着1 天前
playwrite和selenium的区别
selenium·测试工具·playwright
测试老哥1 天前
接口测试和功能测试详解
自动化测试·软件测试·python·功能测试·测试工具·测试用例·接口测试
樱花树下的猫老师2 天前
Postman加Cookie的方式
测试工具·postman
喝养乐多长不高2 天前
详细PostMan的安装和基本使用方法
java·服务器·前端·网络协议·测试工具·https·postman
程序员杰哥2 天前
Postman接口测试: postman设置接口关联,实现参数化
自动化测试·软件测试·python·测试工具·测试用例·接口测试·postman
慌糖2 天前
✨ Apifox:这玩意儿是接口界的“瑞士军刀”吧![特殊字符][特殊字符]
测试工具
试着3 天前
【新技术】微软 Azure Test Impact Analyzer (TIA) 全面解析
测试工具·microsoft·azure·测试覆盖率