What is Monkey Test?
In software testing, monkey testing is a technique where the user tests the application or system by providing random inputs and checking the behavior, or seeing whether the application or system will crash. Monkey testing is usually implemented as random, automated unit tests.
While the source of the name “monkey” is uncertain, it is believed by some that the name has to do with the infinite monkey theorem, which states that a monkey hitting keys at random on a typewriter keyboard for an infinite amount of time will almost surely type a given text, such as the complete works of William Shakespeare. Some others believe that the name comes from the classic Mac OS application “The Monkey” developed by Steve Capps prior to 1983. It used journaling hooks to feed random events into Mac programs, and was used to test for bugs in MacPaint.
Monkey Testing is also included in Android Studio as part of the standard testing tools for stress testing.
One word to describe Monkey Test: no test case, no test plan and no test requirement!
Theory behind Monkey Test
The tools simulate user’s input (e.g. touch screen, gesture, key input) by using socket communication. It’s pretty command software testing especially in Android.
Types of Monkey Test
Smart monkey tests
Smart monkeys are usually identified by the following characteristics:
- Have a brief idea about the application or system
- Know its own location, where it can go and where it has been
- Know its own capability and the system’s capability
- Focus to break the system
- Report bugs they found
Some smart monkeys are also referred to as brilliant monkeys, which perform testing as per user’s behavior and can specify some probabilities of bugs to be occurred.
Dumb monkey tests
Dumb monkeys, also known as “ignorant monkeys”, are usually identified by the following characteristics:
- Have no knowledge about the application or system
- Don’t know if their input or behavior is valid or invalid
- Don’t know their or the system’s capabilities, nor the flow of the application
- Can find fewer bugs than smart monkeys, but can also find important bugs that are hard to catch by smart monkeys