A Complete Guide To Monkey Testing

Timothy Joseph
Timothy Joseph | August 3, 2021
A Complete Guide to Monkey Testing

Monkey testing in software testing is an approach wherein the tester applies random inputs to the application to verify its capabilities. This is a functional black-box testing method that is done when there is insufficient time to write and execute tests.

Also called stochastic testing, monkey testing can be done for mobile, web, and desktop applications. It is often implemented as random and automated unit tests, which makes it advantageous, as it can quickly estimate software reliability.

In this post, we’ll discuss what monkey testing is with examples, as well as cover its features, its differences with other kinds of tests, and the advantages and disadvantages of this kind of testing.

The Features Of Monkey Testing

Monkey testing is performed automatically with no specifications in mind. The main goal of the test is to identify bugs and errors in the program to ensure that the products are ready to be released to the public.

Here are some of the features of monkey testing:

  • Monkey testing is performed by providing unexpected actions or random inputs in the software application to verify behavior and identify any errors.
  • Testers, developers, or stakeholders can perform monkey testing and can do it even if they do not have the knowledge of the domain and logic of the program.
  • Monkey tests are done randomly, verifying both valid and invalid scenarios.
  • Monkey testing does not follow any test cases and there are no predefined conditions that follow this technique.
  • Monkey testing has similarities to fuzz testing with the major difference being the repetitive and random actions.

2021-2022 Software Development and QA Testing Report

 

Types Of Monkey Testing

Although a monkey typing test is done randomly, there are still different ways in which to perform this sort of testing.

Here are some of the most common techniques used:

  • Smart Monkey Tests

    In smart monkey testing, the test manager or lead assigns testers who are familiar with the program that they are going to test. Since they are already acquainted with the product, they can input random data to test it, knowing that it is not valid, while performing random actions.

    Smart monkey testing is beneficial because it ensures the program works as intended within valid conditions and can also handle invalid data accordingly.

  • Dumb Monkey Tests

    Dumb monkey tests are where the lead tester or manager assigns a tester who does not know the application or module. The tester has to test the program based on their intuition and input random data that they believe is correct.

  • Brilliant Monkey Tests

    Brilliant monkey testing is where a tester is deployed to test the program, particularly because they have domain knowledge of the application.

    The tester can expect the sequencing of the steps to be performed in a specific way and they may have an in-depth understanding of the data that they use. In the field, however, end-users who have domain expertise may perform tasks in a different way using other data.

    Having the test performed by a knowledgeable individual is beneficial as they can enter random data inputs from their domain perspective.

 

What Is Gorilla Testing?

Gorilla testing is another software testing method in which a module of the application is tested repeatedly, ensuring that it works correctly, and that no bugs are found in the module.

Also known as fault tolerance testing or torture testing, gorilla testing developers and testers work together to test the functionalities of a module following a manual, repetitive approach.

 

Monkey Vs. Gorilla Testing

Although monkey testing and gorilla testing have a similar approach in applying random inputs to the program being tested, they have distinct differences in verifying applications that make both unique.

Monkey Testing Gorilla Testing
It is performed based on random inputs without using any test cases Gorilla testing is performed on random inputs repeatedly and is based on a module
It aims to verify the performance of the whole application Gorilla testing checks and analyzes a single module thoroughly
It can be performed by any stakeholder involved in the project A knowledgeable tester or developer is necessary when performing gorilla testing
Monkey testing is used in system testing Gorilla testing is used in unit testing
The objective of monkey testing is to crash the entire system The objective of gorilla testing is to crash one specific module at a time
 

Monkey Testing vs. Ad-Hoc Testing

You may have heard about ad-hoc testing as well, and that it has similarities with monkey testing. Although it appears so, both kinds of testing differ from each other in these specific ways:

Monkey Testing Ad-Hoc Testing
Bugs in monkey testing are discovered after applying random inputs Bugs in ad-hoc testing are discovered after analyzing unexplored areas of the program
Testers in monkey testing are not familiar with the application Testers in ad-hoc testing know the application and understand its functionalities
Testers performing monkey testing do not have to be an expert nor are they required to have in-depth knowledge of the application Testers in ad-hoc testing are required to be experienced in the application’s workflow and domain
 

Advantages of Monkey Testing

These are the advantages you can get with monkey testing:

  • Test for new kinds of bugs: Testers can fully expose bugs or errors in the system when performing monkey testing.
  • Easy execution: Tests that are arranged randomly and using random data are easy to do.
  • Does not require extensive skills to conduct: It can be accomplished without bringing in experienced testers.
  • Cost-effective: Compared to other kinds of software testing, monkey testing requires significantly fewer resources to complete.
 

Disadvantages of Monkey Testing

Despite its benefits, monkey testing also comes with its own disadvantages.

  • Bugs cannot be reproduced: Reproducing bugs and errors is difficult since the tests are performed randomly.
  • Less accurate: Testers are unable to guarantee the accuracy of the test cases.
  • Requires specific technical knowledge: Testers are required to have some knowledge of the domain.
  • Time-consuming: Monkey testing can take a longer time to complete than other kinds of software tests.
 

Monkey Testing Tools

There are many tools that can help make the process of monkey testing easier for testers. Here are two of the most popular monkey testing tools:

  • Monkey Runner Tool

    The Monkey Runner tool is a program used to test Android applications that can install, execute, and record screenshots on a computer. The tool can also be used for random testing and for running test suites.

  • UI/Application Exerciser Monkey

    The UI/Application Exerciser Monkey tool is different from Monkey Runner as it runs in an ADB shell within the emulator or device. The tool can also be used to generate user and system events in a random stream.

 

Conclusion

Monkey testing is an approach in software testing that can help testers identify new bugs or errors in an application while being easier and more cost-effective to perform than other kinds of tests. It is not the same as gorilla testing and ad-hoc testing, as monkey testing is primarily based on random inputs.

Although this kind of testing may seem chaotic, it is recommended that leads plan ahead and assign it to qualified testers to ensure the highest probability of success. Outsourcing companies are more than able to provide the custom software testing services that you need. To know more about how QASource can help, contact us today

Disclaimer

This publication is for informational purposes only and nothing contained in it should be considered legal advice. We expressly disclaim any warranty or responsibility for damages arising out of this information and encourage you to consult with legal counsel regarding your specific needs. We do not undertake any duty to update previously posted materials.