------Monkey Tools for Android automated testing

Source: Internet
Author: User

Although the general company has specialized testers, but sometimes we have to go to develop products, but also to test products, testing products, some mechanized point interface operation, Google has provided us with tools, Monkey, monkey Test.


What is Monkey

Monkey is a command-line tool in Android that can be run in the emulator or in the actual device. It sends pseudo-random user event streams (such as key input, touch input, gesture input, etc.) to the system, enabling stress testing of the application under development. Monkey testing is a fast and effective method to test the stability and robustness of the software.

Characteristics of Monkey

1, the test object is only the application package, there are certain limitations.

2. The event stream data stream used by the Monky test is random and cannot be customized.

3, can set the Monkeytest object, the number of events, type, frequency, etc.


Basic usage of Monkey

The basic syntax is as follows:

$ adb shell monkey [options]

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. The following is a more typical command-line example that launches a specified application and sends 500 pseudo-random events to it:

$ adb shell Monkey-p your.package.name-v 500


About the stop condition for the monkey test

Monkey test will automatically stop in the following three scenarios during execution:

1. If monkey is qualified to run on one or several specific packages, it will monitor and block attempts to move to other packages.

2. If the application crashes or receives any runaway anomalies, the monkey will stop and error.

3. If the application produces an error that the application does not respond (application not responding), the monkey will stop and make a mistake.

It is a stable enough program to pass multiple and different sets of monkey tests.  


Of course, the monkey test is the most basic test, its test is immediately click, may click on the application, may also be broken network, and so on, a series of possible operations, although the comparison of the basis, but how much is useful, if the detection of problems then the application will crash, in DOS can see the error, For example, I test the demo myself.




------Monkey Tools for Android automated testing

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.