Overview
The Monkey is a command-line tool that that you can run 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 you are
developing.
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.
When the Monkey runs, it generates events and sends them to the system. It also watches
the system under test and looks for three conditions, which it treats specially:
- If you have constrained the Monkey to run in one or more specific packages, it
watches for attempts to navigate to any other packages, and blocks them.
- If your application crashes or receives any sort of unhandled exception, the Monkey
will stop and report the error.
- If your application generates an application not responding error, the Monkey
will stop and report the error.
Depending on the verbosity level you have selected, you will also see reports on the progress
of the Monkey and the events being generated.