There is a tool that comes with an SDK called Monkey that generates pseudo-random streams of custom events, for example:
- clicks
- strokes
- gestures
- a series of events at the system level.
You can use the monkey for the stress testing applications you develop in a random but repeatable manner.
There is also a monkeyrunner tool that provides an API for writing programs that control an Android device or emulator from outside Android code. With monkeyrunner, you can write a Python program that installs an Android application or test suite, launches it, sends keystrokes to it, takes screenshots of its user interface and saves screenshots on the workstation.
source share