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;