Key to Android development, touch screen and gesture input professional stress test method

Source: Internet
Author: User

functions such as key input , touch screen input and gesture input are the basic features of Android development, and its stability and robustness are important for mobile application development . key presses, touch screens and gesture inputs the professional stress test method can be used Monkeyto stress test the application to detect the stability and robustness of the application . Monkeyis aAndroidplatform under the automated testing tool, it sends the system pseudo-random user event stream (such as key input, touch screen input, gesture input, etc.).


First, the pressure test tool Monkey Basic usage:

adb shell monkey [options]

Note: If you do not specify Options , Monkey will start in a no-feedback mode and send events to all packages installed in the target environment.

Example: adb shell monkey-p com.demo-v

// launches the specified application and sends it - a pseudo-random event:


Second, the pressure test tool Monkey monitoring of the system in the test, and its three cases of special treatment:

(1) If the application crashes or receives any runaway exceptions, monkey will stop and error.

(2) If the application produces an application that does not respond (Applicationnot responding) the error, Monkey will stop and make an error.

(3) If you limit the Monkey runs on one or several specific packages, it monitors and blocks attempts to move to other packages.

according to the different levels of feedback selected, the Monkey you can also see its execution process reports and generated events.



Three, pressure testing tools Options and Categories for Monkey:

(1) basic configuration options, such as setting the number of events to test;

(2) event type and frequency;
(3) Debugging options.

(4) run constraint options, such as setting the test only for a single package;

(5) Options Detailed Description:



Four, pressure test tool Monkey Basic features of:

(1) the event stream data stream used by the test is random and cannot be customized;

(2) you can set the test object, number of events, type, frequency, and so on.

(3) the tested object is only an application package ( apk package), there are certain limitations;



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.