Monkey Testing

Many automated tests also form a part of any software’s pre-release testing life-cycle. In fact, it is due to these automated tests that testing speeds up at many stages. One such testing technique is known as Monkey Testing.

What Is A Monkey Test?

In terms of software testing, Monkey Testing is the technique wherein the tester enters random variables in order to check the behavior or performance of an application. This test is carried out automatically without the aid of any predetermined strategy.

Monkey Testing can also be described as the arbitrary testing that is performed on any application or software with a view to check its response when erratic data is fed into it. Since this test has no fixed route that needs to be followed it is dependent on the knowledge and expertise of the tester.

Types of Monkey testing

Basically, a monkey in a monkey testing, refers to a tester or any other professional, performing the monkey testing, as a they are independent to do anything, without following any specific pattern, similar to monkey’s nature, who likes to move, anywhere, from one branch to another.

There are two types of monkeys, involved in the monkey testing, which may be described, as under:

Smart Monkey

A smart monkey possess, following qualities:

  • Have some working idea about the software product.
  • Aware of the workflow of the system, i.e. where the product is, and where it will be directed.
  • They are aware of the inputs, being fed to the system, i.e., know, which is valid and invalid type of input.
  • Understands the capability of the system, along with its own strength.
  • Dedicated & determined, to break the system.
  • Able to report a bug, on identifying the errors.

Dump Monkey

A dump monkey, reflects the following characteristics:

  • No knowledge and idea about the system and its functionalities.
  • Unaware of the workflow of the system.
  • No idea about the type of input, being fed to the system, i.e. valid or invalid.
  • Not able to determine the system’s capablility.
  • Finds lesser bugs, in comparison to smart monkey, but may explore bugs, which are hard to be found, even by the smart monkeys.

Features Of Monkey Testing

The notable features or characteristics of Monkey Testing are:

  • Impossible To Reproduce Results — as Monkey Testing works by feeding random data, it is next to impossible to create or reproduce the same set of errors or response. The data used of random testing is auto generated and so it becomes difficult to attain the same specific data set again.
  • Any Random Data Can Be Used — when it comes to Monkey Testing there is no right business case. What it means is that every random data can be used to check the system response. Since any data set can be used, there does not arise a question about right or wrong.
  • Domain Expertise A Must — random data causes random system behavior, as such only a domain expert can judge the impact of such responses. Hence, Monkey Testing should always be carried out under the watchful eyes of an expert whose knowledge and experience allows them to understand the importance of each response.

Pros Of Monkey Testing

The advantages of Monkey Testing are:

  • Automatic — this testing is mostly conducted automatically and therefore it is quick and efficient. The data is also generated automatically so minimum human intervention is required.
  • Anybody Can Perform — almost anybody who is capable of reading and following instructions can carry out Monkey Testing. Obviously, they will be unable to judge the relevance of the output, but they will face no problem while conducting the test.
  • Allows Checking Of Server Response — in an indirect manner, Monkey Testing allows the domain expert to judge the server response to the software. Since, the scenarios are improvised and unplanned the software comes under stress and that effects the server response as well.
  • Makes Up For Time Crunch — if by any chance there is a time crunch or resource crunch and all the other testing levels have been completed to client satisfaction, then Monkey Testing allows a quick fix to completing the testing cycle.

Cons of Monkey Testing

Some of the disadvantages, of using the monkey testing approach, may be seen, as under:

  • Testing may be carried out, for an infinite duration, until bugs, are not explored.
  • Number of bugs are very less.
  • It’s a tedious task, to reproduce a defect, in the monkey testing.
  • It may be useful, in exploring some of the bugs, but sometimes, it may results into unexpected outcomes, which may be difficult, to understand, and prove to time-consuming.

Monkey Testing is very ad-hoc in nature and many a times confused with Gorilla Testing which is pre-planned and strategized. Further, it is also being compared with the fuzz testing, but both of them, are very much, different to each other, as fuzz testing concerns with the randomly selected data input, whereas monkey testing, deals with the random actions, to carry out the testing.

It is pertinent, to mention that some of the people, finds monkey and adhoc testing, as the same testing technique, which is inappropriate to say, as ad-hoc testing is carried out, without any planning or documentation work, and its purpose, is to divide the system into subparts, in order to evaluate functionality, which is opposite, to the working of monkey testing.

Hence, it should be clearly remembered that the Monkey testing is very much different from other types of testing techniques that serve different purposes. Choose the correct test as per your requirement.

Originally published at