Difference between Monkey and Monkeyrunner Tool

Key Difference: The Monkey runs directly onto the device or emulator and creates streams of simulated user and system events. The Monkeyrunner Tool, on the other hand, is an application programming interface (API) that allows one to write a program using the Jython (Python written in Java) programming language to control the devices and emulators.

Before any software or application is ready for release, it must be properly tested to ensure that there are no bugs in the system. For this purpose, there are a variety of tests that check the application thoroughly from all angles. One of these tests is monkey testing.

Monkey testing is a type of test that randomly tests the software. The purpose of the test is to try to crash the software and ensure that it does not. For this purpose, the test can include random tests such as literally typing random strings into text boxes to see how the system would handle the error.

The test tries to emulate the layman who may not know anything about the software or application and may do something to crash the system. The test tries to randomly find out how the user may possibly do that, so that the developer can fix it beforehand.

One of the ways to run monkey testing on your application is to use the monkey tool. The monkey tool is actually the UI/Application Exerciser Monkey that is commonly referred to as the monkey. The Monkey runs directly onto the device or emulator and creates streams of simulated user and system events.

The monkey can be used in four different combinations: for basic configuration, such as setting the number of events to attempt; for operational constraints, such as restricting the test to a single package; for various event types and frequencies; and for debugging options.

The Monkeyrunner Tool, on the other hand, is an application programming interface (API) that allows one to write a program using the Jython (Python written in Java) programming language to control the devices and emulators. It does this by sending specific commands and events from an API to the device or emulator. Monkeyrunner can be used to install an Android application, run it, send keystrokes to it, take screenshots of its user interface, and store screenshots on the workstation.

Comparison between Monkey and Monkeyrunner Tool:

 

Monkey Tool

Monkeyrunner Tool

Also known as

UI/Application Exerciser Monkey

monkeyrunner

Purpose

Runs monkey testing on the application

Automates the start and run of the monkey tool

Run location

Emulator/device environment

A workstation

Start process

Must be run through a command line

Runs automatically after the program is written

Programming

Can use its own command –port to start and run

Must use Jython to write a program to use monkeyrunner

Description (according to Android Developer website)

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.

The monkeyrunner tool provides an API for writing programs that control an Android device or emulator from outside of Android code. With monkeyrunner, you can write a Python program that installs an Android application or test package, runs it, sends keystrokes to it, takes screenshots of its user interface, and stores screenshots on the workstation. The monkeyrunner tool is primarily designed to test applications and devices at the functional/framework level and for running unit test suites.

Image Courtesy: slideshare.net

Most Searched in Computers and Internets Most Searched in Pregnancy and Parenting
Top 10 Most Searched Differences Most Searched in Sports
Samsung Galaxy Mega 6.3 vs Samsung Galaxy Tab 2 7.0
Spoof vs Parody vs Satire
Asus FonePad vs HP Slate 7
Samsung Galaxy Note 8.0 vs Samsung Galaxy Note 10.1

Add new comment

Plain text

CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.