Overview
The Monkey is a command-line tool that can be ran on any emulator instance or on a device. It sends a pseudo-random stream of user events into the system, which acts as a stress test on the application software.
The Monkey includes a number of options, but they break down into four primary categories:
- Basic configuration options, such as setting the number of events to attempt.
- Operational constraints, such as restricting the test to a single package.
- Event types and frequencies.
- Debugging options.
- If the Monkey was configures to run in one or more specific packages, it watches for attempts to navigate to any other packages, and blocks them.
- If the application crashes or receives any sort of unhandled exception, the Monkey will stop and report the error.
- If the application generates an application not responding error, the Monkey will stop and report the error.
Usage
The syntax is:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ adb shell monkey [options] <event-count> |
The command options can be found in the official documentation.
Here is an example:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ adb shell monkey -p your.package.name -v 500 |
Komentar
Posting Komentar