Skip to content

Blazingly fast monkey to stress test your iOS application

License

Notifications You must be signed in to change notification settings

donaldhu/xc-auto-monkey

Repository files navigation

XC AutoMonkey

Blazingly fast monkey to stress test your iOS application

README

Installation

  1. In Xcode, create a new target with template iOS UI Testing Bundle (File → New → Target → iOS UI Testing Bundle)

Step 1

2. Add [MonkeyUITests.m](https://github.com/donaldhu/xc-auto-monkey/blob/master/MonkeyUITests.m) into the new UI test target.

Step 2a

3. Run the monkey test by running your project tests (`Command(⌘) + U`)

Configuration

At the top of MonkeyUITests.m, there are some configuration settings:

static NSTimeInterval const XCMonkeyEventDelay = 0.1;  // In seconds

// Test pass conditions
// Set the value to 0 if you do not want to use the pass condition
// The monkey test will pass if ANY of the conditions are met

static NSUInteger const XCMonkeyEventsCount = 100000;
static NSTimeInterval const XCMonkeyDuration = 60 * 60 * 5; // In seconds

// Weights control the probability of the monkey performing an action
// A heigher weights results in a higher probability

static NSUInteger const XCMonkeyEventWeightTap = 500;
static NSUInteger const XCMonkeyEventWeightPan = 50;
static NSUInteger const XCMonkeyEventWeightPinchIn = 50;
static NSUInteger const XCMonkeyEventWeightPinchOut = 50;
static NSUInteger const XCMonkeyEventWeightBackgroundAndForeground = 1;

Coming Soon

  • New gestures and events
    • Orientation
    • Volume up and down
    • Multiple taps
    • Lock
  • Improved device support for not triggering control and notification centers

About

Blazingly fast monkey to stress test your iOS application

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published