话说monkey

    xiaoxiao2021-03-25  95

    1、Monkey:猴子

    adb的monkey,就只sdk自带的像猴子一样点击进行压力测试,测试健壮性、稳定性。

    2、ANDROID Monkey

    adb root以后使用“adb shell monkey -h"查看帮助,或者问度娘!~ ~

    usage: monkey [-p ALLOWED_PACKAGE [-p ALLOWED_PACKAGE] ...]               [-c MAIN_CATEGORY [-c MAIN_CATEGORY] ...]               [--ignore-crashes] [--ignore-timeouts]               [--ignore-security-exceptions]               [--monitor-native-crashes] [--ignore-native-crashes]               [--kill-process-after-error] [--hprof]               [--pct-touch PERCENT] [--pct-motion PERCENT]               [--pct-trackball PERCENT] [--pct-syskeys PERCENT]               [--pct-nav PERCENT] [--pct-majornav PERCENT]               [--pct-appswitch PERCENT] [--pct-flip PERCENT]               [--pct-anyevent PERCENT] [--pct-pinchzoom PERCENT]               [--pkg-blacklist-file PACKAGE_BLACKLIST_FILE]               [--pkg-whitelist-file PACKAGE_WHITELIST_FILE]               [--wait-dbg] [--dbg-no-events]               [--setup scriptfile] [-f scriptfile [-f scriptfile] ...]               [--port port]               [-s SEED] [-v [-v] ...]               [--throttle MILLISEC] [--randomize-throttle]               [--profile-wait MILLISEC]               [--device-sleep-time MILLISEC]               [--randomize-script]               [--script-log]               [--bugreport]               [--periodic-bugreport]               COUNT

    3、IOS monkey:

    能测试设备真机,模拟设备!抓取系统、崩溃、instrument等多种日志!最终收集测试设备信息,出具图文、过程的报告!其也可实现测试中切app到后台再自行恢复!

    测试前检查环境:OS系统为10.10.x以上,xcode6.x以上, homebrew可用,gem可用,被测试版本安装(uuid).

    测试:先配置custom.js文件中事件次数

    (路径:Library/Ruby/Gems/2.0.0/gems/smart_monkey–0.3/lib/ui–smart–monkey/custom.js)

    命令:smart_monkey –a 包名 –w 设备udid –n 1(运行custom.js文件次数) –c custom.js的全路径或者父目录。

    命令中custom.js文件为配置好的,输入全路径还是父目录路径依据安装的monkey.

    运行结束生成报告:报告路径在运行窗口也会有显示,之后查看index文件即可!

    注意可使用smart_monkey –h查看monkey命令帮助。

    转载请注明原文地址: https://ju.6miu.com/read-21713.html

    最新回复(0)