Hello …. Monkey !!!

H

The main issue i used to struggle with while developing android applications was stress testing.

As a beginner it was very hectic job to test the application from the naive users perspective. As we develop the application we know what things to do to get the result but to check whether the app responds properly even for wrong events like tapping wrong button etc. Android provided a tool Monkey with which one can simulate events on Emulator or device and generates pseudo-random streams of user events such as clicks, touches, or gestures, as well as a number of system-level events.

Monkey is a command-line tool that you can run on any emulator instance or on a device.

You can do this by using the monkey command. The syntax is

 
adb shell monkey [options] <event-count>

Here is a more typical command line, which will launch your application
and send 500 pseudo-random events to it:

adb shell monkey -p your.package.name -v 500

For more command options you can refer Android Docs section

About the author

mahesh.muley
By mahesh.muley

Category