Monkey test Methods

Source: Internet
Author: User

1, Monkey Test principle:

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.

2. Monkey Common commands:

adb shell Monkey {+ command argument} times

ADB Shell Monkey-help/-h

3, Analysis:

ADB shell monkey–v–v–v–p package name –s--throttle--ignore-crashes--ignore-timeouts 10000

-V: Used to specify the level of feedback information, that is, the verbosity of the log, with a total of three levels

-P: After the corresponding package name, if it is the whole test, it is not necessary, use this parameter to specify one or more packages (package, app name)

-s:seed value, if the seed value is the same, two random events are the same, commonly used for problem recurrence

--throttle < milliseconds;: Time delay for the specified user (that is, inter-event), in milliseconds

--ignore-crashes--ignore-timeouts: In the monkey test process, encountered the situation of crash or timeout ignored, generally not set, when there is crash or timeout, monkey test will be terminated, Here is to prevent the monkey test from terminating.

10000: Number of random events

4. Terminate the process

ADB shell

PS | grep Monkey

Kill-9 PID

Monkey test Methods

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.