稳定性测试—fastboot和monkey区别

编程入门 行业动态 更新时间:2024-10-22 10:57:28

<a href=https://www.elefans.com/category/jswz/34/1768810.html style=稳定性测试—fastboot和monkey区别"/>

稳定性测试—fastboot和monkey区别

一、什么是稳定性测试

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

二、Monkey

1.什么是Monkey

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

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

(1)安装adb调试桥

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

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

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

=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.androidmands.monkey.Monkey -p package_name --agent reuseq --running-minutes duration(min) --throttle delay(ms) -v -v

四.工具比对

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

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

更多推荐

稳定性测试—fastboot和monkey区别

本文发布于:2023-11-16 17:36:57,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1629172.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:稳定性   区别   测试   fastboot   monkey

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!