Tuesday, January 24, 2012

Monkey Test : Testing Application on Android devices

Monkey Test : Testing Application on Android devices :

The monkey tool runs in an adb shell directly on the device or emulator and generates pseudo-random streams of user and system events. In comparison, the monkey runner tool controls devices and emulators from a workstation by sending specific commands and events from an API.

The monkey runner tool provides these unique features for Android testing:

* Functional testing: monkey runner can run an automated start-to-finish test of an Android application. You provide input values with keystrokes or touch events, and view the results as screenshots.

* Regression testing - monkey runner can test application stability by running an application and comparing its output screenshots to a set of screenshots that are known to be correct.

UI/Application Exerciser Monkey:

The Monkey is a program that runs on your 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. You can use the Monkey to stress-test applications that you are developing, in a random yet repeatable manner.

Basic Use of the Monkey

You can launch the Monkey using a command line on your development machine or from a script. Because the Monkey runs in the emulator/device environment, you must launch it from a shell in that environment. You can do this by prefacing adb shell to each command, or by entering the shell and entering Monkey commands directly.

The basic syntax is:
adb shell monkey [options]

With no options specified, the Monkey will launch in a quiet (non-verbose) mode, and will send events to any (and all) packages installed on your target. Here is a more typical command line, which will launch your application and send 50000 pseudo-random events to it:

adb shell monkey –p your.package.name – throttle 100 –v 50000

o -p
o --throttle
o -v
o 50000 <50000 events> (~30 minutes)

Use the Monkey to stress-test applications.
o Number of events
o Single package
o Event types and frequencies
o Debugging options.

1 comment:

Unknown said...

Hello,
The Article on Monkey Test for Testing Application on Android devices give detailed information about it. Thanks for Sharing the information about Mokey testing for Mobile For More information check the detail on the Monkey testing here Software Testing Company