Monkey Testing

March 19, 2019

Testing, which is a crucial part of Software Development Life Cycle (SDLC), helps software engineers in determining the quality, performance, reliability, effectiveness, and security of the product, both before and after its release. Moreover, testing is the best way of finding bugs and defects in the software as well as to resolve them as soon as they are detected by the team of testers. Monkey Testing/Random Testing, is a type of software testing, which was mentioned for the first time in the book The Art of Software Testing by Glenford J. Myers in 1979.

This technique of software testing is extremely popular among software engineers and is used by them to test applications by providing random inputs and checking its behaviour.

Monkey Testing/Random Testing: Definition

A software testing technique, where the user tests the application by providing random inputs, is known as Monkey Testing or Random Testing. It is a functional black box testing, which is performed when there is not enough time to write and execute the tests. Monkey testing, which is technically known as stochastic testing, can be performed for desktop, web and mobile applications and it is usually implemented as random, automated unit tests. This type of testing gives us an advantage of easily estimating software reliability from test outcomes.

This form of testing, the test inputs are randomly generated according to an operational profile and failure times are recorded. The data that is generated or obtained from random testing can then be further used to estimate products reliability. Other testing methods cannot be used in this way to estimate software reliability.

Use of inputs of random testing / monkey testing can save some of the time and effort that more thoughtful test input methods require. Mostly performed automatically, in monkey testing the user enters any random invalid input and checks its behaviour. Moreover, it does not follow any predefined test cases or strategy and hence works on tester’s mood and gut feeling. Monkey Testing / Random testing works very well when doing load and stress testing.

Characteristics of Monkey Testing:

The term monkey testing comes from the idea that if someone had a million monkeys typing on a million keyboards for a million years, statistically, they might write a Shakespeare play, or some other great work. All the random pounding of the keys could accidently hit the right combinations of letters and the monkeys would for a moment, look brilliant.

Following this theory, Monkey Testing usually involves testing the software or application by providing random data and observing if the system crashes or not. Monkey testing is an automated test that is conducted without any specific test in mind. The main objective of this type of testing is to crash the system by providing random inputs and to ensure that it does not crashes once the product is developed completely. Other characteristics of monkey testing/ random testing are:

It is an automated test that is conducted without any specific test in mind.

Its aim is to crash the system by providing random inputs and to prevent it from happening once the product is developed completely.

It is performed where the defects are not identified in regular intervals.

Is used to list system’s reliability and performance.

The time and effort invested in monkey testing/random testing is comparatively less than actual test efforts.

Types of Monkey Testing:

Random testing which is commonly known as Monkey testing, is defined as a testing that deal with random inputs and data. In this process of testing, the random inputs are identified to be evaluated against the system and the tests are selected independently from the test domain. Moreover, the tests are executed using the random inputs, after which the results are recorded and compared against the expected outcomes.

At the end the team of testers try to replicate the issue, once the defects are retested and fixed. The process of monkey testing/random testing can be categorised into three types, each of which is focused on different aspects of the software and play different role in finding various bugs and discrepancies. These types of monkey testing are:

Dumb Monkey Testing:

In this type of monkey testing, the tester have no knowledge of the product or application. They do not have any idea whether the provided inputs are valid or invalid. Because of all these factors, they are also known as ‘ignorant monkeys’. This is the easiest and most straightforward type of monkey testing, which does not know their or system’s capabilities, nor the flow of the application. Dumb monkey testing can find fewer bugs than smart monkeys, but can unknowingly find important bugs that are hard to catch.

Smart Monkey Testing:

Smart Monkey testing is the second type of monkey testing, wherein the tester is completely aware of the system or the application. Moreover, the team of testers know the products exact functionality and therefore provide inputs that are appropriate as well as valid, which helps them in performing tests on the product. Additionally, the smart monkey tests are aware where the pages of application will redirect to.

In this type of monkey testing, the testers are focused on breaking the application and if they find an error, then they are smart enough to file a bug. Also, this is a great option to do load testing and stress testing.

Brilliant Monkey Testing:

The last, but for sure not the least effective, type of monkey testing is brilliant monkey testing. In this the tester has a fair idea of the system and the application. Moreover, they know how the users are using the product and hence, they carry out the process of testing from the user’s perspective. Brilliant monkey test can also specify some probabilities of bugs that might be found in the software in future.

Advantages and Disadvantages of Monkey Testing

Monkey testing cater to a vast array of testing needs of an organisation and make the process of testing easy as well as cost effective. It is a software testing technique that tests scenarios which are generally random and ad-hoc. Apart from providing several advantages to the users and testers, monkey testing has several disadvantages, which can at time overpower its positive qualities. Therefore, here are some of the advantages as well as the disadvantages of monkey testing:

Monkey Testing: Advantages

With the assistance of Monkey testing one can identify some out of the box errors.

It is testing technique that is easy to set up and execute.

Monkey testing can be done by “not so skilled” testers.

It is a great technique to test the reliability of the software.

One can easily identify bugs with the assistance of this testing, which may have higher impact on the software’s effectiveness and performance.

This type of software testing is extremely cost effective.

Monkey Testing :Disadvantages

The tests carried out during monkey testing are so random that it is either not possible or very difficult to recreate any bug.

It’s very difficult and time consuming to analyse the unexpected issues found during the monkey testing.

Testers have difficulty in defining the exact test scenarios and they also cannot assure the accuracy of test cases.

Monkey testing may consume lots of time before finding a bug because it does not have any predefined tests.

Is Monkey Testing same as Gorilla Testing and Fuzz Testing?

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.

Conclusion:

Monkey Testing/Random Testing is a type of software testing, which is comparatively new as well as popular among software testers. It is a testing technique, where the users provide random inputs and then execute testing to check its behaviour as well as to know whether the system or application crashes or not. Moreover, it is an automated test that is conducted by the team of testers without any specific test in mind.

The main objective of the team during monkey testing is to crash the system and to prevent it from happening in the future under any circumstances. Monkey testing, which is also known as random testing, is the easiest way of testing the quality, functionality, as well as the performance of the software.