相关链接:
https://testerhome.com/topics/2523
github issue 传送门
Step 1. brew install libimobiledevice Step 2. brew install -HEAD ideviceinstaller Step 3. brew install imagemagick Step 4. gem install smart_monkey 上面这三部都执行成功就可以执行了,具体执行看说ReadMe https://github.com/vigossjjj/CrashMonkey4IOS 或者直接 smart_monkey -h
iOS Monkey Test Tool.
gem install smart_monkey, 执行入口: 终端下直接使用smart_monkey
直接clone本项目, 执行入口: /CrashMonkey4IOS/bin/smart_monkey
smart_monkey -a ${App_BunnelID}
-c: 自定义的配置集路径,参数必须为目录,目录下必须包含custom.js,若使用handler,目录下需存在名为handler的文件夹,用于存放相关文件。e.g.-c /my/path/custom_cfg
如果使用custom_cfg必须遵守如下目录结构:
custom_cfg ├── custom.js └── handler ├── buttonHandler.js └── wbScrollViewButtonHandler.js--event-number: 定义Monkey测试的总事件数,默认为50。e.g.--event-number 100
--compress-result: 对测试过程中截取的图片进行压缩,以节省空间开销。e.g.--compress-result 50%
--detail-count: 定义报告详情中记录的事件总数,默认为50,即在报告当中展示最近的50次随机事件,且进行操作示意绘制。e.g.--detail-count 100
--show-config: 打印当前的配置信息,即custom.js。e.g.--show-config
--drop-useless-img: 删除除展示在报告当中的其余截图,以节省空间开销,如,一轮Monkey测试共产出截图100张,参数--detail-count设置为20,那么使用--drop-useless-img会删除其余80张截图。e.g.--drop-useless-img
--list-app: 打印当前连接的真机及模拟器中所安装的app。e.g.--list-app
--list-devices: 打印当前所有可用设备。e.g.--list-devices
--reset-ios-sim: 重启模拟器。e.g.--reset-ios-sim
--version: 打印smart_monkey的版本号。e.g.--version
⇒ CrashMonkey4IOS/bin/smart_monkey -h Usage: smart_monkey [options] -a app_name Bundle ID of the desired target on device(Required) -w device Target Device UDID(Required) -n run_count How many times monkeys run(default: 1) -d result_dir Where to output result(default: ./smart_monkey_result) -t time_limit_sec Time limit of running -s dsym_file Use .dSYM file to symbolicating crash logs -c custom_cfg_path Indicate confige lib directory path, not a file path. --event-number event_number The monkey event number(default: 50) --compress-result compress_rate compress the screenshot images to save disk space!(example: 50%) --detail-count detail_event_count How many events to show in detail result page(default 50) --show-config Show Current Configuration custom.js --drop-useless-img Delete the un-displayed images of detial page. --list-app Show List of Installed Apps in iPhone/iPhone Simulator --list-devices Show List of Devices --reset-ios-sim Reset iPhone Simulator --version print smart monkey version