iOS 压力测试

来源:互联网 发布:积分入学社保怎么算法 编辑:程序博客网 时间:2024/05/01 00:36

iOS 压力测试

iOS 压力测试推荐 GitHub 上的 ui-auto-monkey。
使用简介如下:
1.Xcode 打开你的 iOS 项目,Product -> Profile -> Automation;
Automation

2.打开 Instruments 后,导入 UIAutoMonkey.js 脚本;

3.修改脚本中的配置信息;

config: {  numberOfEvents: 1000,  delayBetweenEvents: 0.05,    // In seconds  // Events are triggered based on the relative weights here.  // The event with this highest number gets triggered the most.  eventWeights: {    tap: 30,    drag: 1,    flick: 1,    orientation: 1,    clickVolumeUp: 1,    clickVolumeDown: 1,    lock: 1,    pinchClose: 10,    pinchOpen: 10,    shake: 1  },  // Probability that touch events will have these different properties  touchProbability: {    multipleTaps: 0.05,    multipleTouches: 0.05,    longPress: 0.05  }},

4.执行该脚本,就可以跑起来了;

5.log 信息如下图:
log信息

0 0