孟珍

导航

IOS压力测试

iOS 压力测试

iOS 压力测试推荐 GitHub 上的 ui-auto-monkey。 

使用简介如下: 

1.Xcode 打开你的 iOS 项目,Product -> Profile -> 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 信息如下图: 

 

 

posted on 2016-08-25 10:00  孟珍  阅读(658)  评论(0编辑  收藏  举报