IOS Stress test-ui Automonkey

Source: Internet
Author: User

The UI Automonkey is a very simple iOS stress test tool. It allows you to send swipe, drag, rotate, and even lock screen and unlock commands to your iOS device. Original GitHub Address: Https://github.com/jonathanpenn/ui-auto-monkey

If your Mac computer already has Xcode installed, the environment is OK, and Xcode has its own UI automation and instruments. Follow the steps below to use UIAutomonkey.js this JS script for monkey testing.

1, first, use Xcode to open your iOS project, or use Xcode to build a new project, select the model, choose "Profile" from the "Product" menu (or direct shortcut key command+i), so you can build an iOS project, and start the tool template selector.

Take this example: "One" for example (from GitHub)

2. Next, select "Automation" in the selector. Once we have created an Automation template, we can test the app's performance.

3, in the Scripts panel, click "Editor Log", select "Script" in the drop-down list, click on the settings, then click the "Add" button, select "Create" in the drop-down list, you can create a new JS script, will UIAutoMonkey.js The contents of this file are pasted into the new JS script, or you can click Imprt to UIAutoMonkey.js  Enter the import (recommended).

, you can directly click the Play button to come.

Uiautomonkey.js's address Https://github.com/jonathanpenn/ui-auto-monkey

4. Click the Play button to execute the script, and the monkey test will begin.

5. Log obtained:


UIAutoMonkey.jsThe script begins with the following code:

    config: {        numberOfEvents: 1000,        delayBetweenEvents: 0.05,    // In seconds        //各事件的几率.        // 数字越大,几率越大.        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        }        },

numberOfEventThe meaning is clear and represents the number of random events that need to be generated.

delayBetweenEventsRepresents a delay time between two events. This value is generally required for adjustment. If the value is 0, the script sends events to the device as quickly as possible.

eventWeightsThis value represents the chance of triggering each event. If the tab event has a value of 100 and orientation the event has a value of 1, then the tab chance of event firing is orientation 100 times times.

touchProbabilityControls the different kinds of tab events. By default, tab is the Click event. Adjust these parameters to set the frequency at which the double-click, long-event occurs. These values are bounded between 0 and 1.

IOS Stress test-ui Automonkey

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.