Blazingly fast monkey to stress test your iOS application
- In Xcode, create a new target with template
iOS UI Testing Bundle
(File → New → Target → iOS UI Testing Bundle
)
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;
- New gestures and events
- Orientation
- Volume up and down
- Multiple taps
- Lock
- Improved device support for not triggering control and notification centers