Langsung ke konten utama

Android UI/Application Monkey test

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.
When the Monkey runs, it generates events and sends them to the system. It also watchesthe system under test and looks for three conditions, which it treats specially:
  • 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:

The command options can be found in the official documentation.

Here is an example:







 

Komentar