Updated April 1, 2023
Introduction to Monkey Testing
Monkey Testing is a type of testing where user tests the system or an application by providing random inputs and checking the behavior or tests if the application or system crashes. Usually this type of testing in implemented randomly as automated Unit test. This Monkey testing was first used in 1983 to test MacWrite and MacPaint on Mac OS. As the name ‘Monkey’ refers to notorious and this is uncertain stating a monkey hitting keys at random on a keyboard for an infinite amount of time will surely result in some input. This Monkey testing is included in Android Studio as part of Stress testing tools. Purpose of this Monkey testing is to find out bugs or errors.
Monkey Testing in Software is a technique used for testing by developers and testers or we can say anyone who has an idea over the application or not, test the application by providing random inputs and checking the behavior of the application or trying to crash the application. This technique is done automatically where user enters any invalid inputs to check applications’s behavior.
This technique does not follow any rules or any predefined test cases and strategies.
- In Monkey testing, tester is considered as a Monkey, also developers can be considered as they also perform testing
- Monkey randomly performs a task or provides input to the system without his understanding knowledge of the application.
- This is just like a normal tester who applies his/ her test cases without predefining any strategies to find bugs or errors.
- Monkey Testing can be used as Unit Testing or GUI Testing.
- Scenario of which testing is being done may or may not be right according to business requirements.
- As this is random testing, testers will not be able to recreate the bugs
- It is a kind of black box testing and is done to ensure that the specifications given by the client are addressed properly.
- This type of testing is mostly done when tester has less time to create and execute test cases.
- Also be called as Random Testing, Fuzzy Testing, technically names as Stochastic Testing.
Types of Monkey Testing
It can be further divided into 3 categories based in the way of its implementation.
- Dumb Monkey
- Smart Monkey
- Brilliant Monkey
1. Dumb Monkey
- Monkey Tester who has no idea about the system or the functionality and no assurance on validity of test cases is refereed as Dumb Monkey.
- They also do not know if their input data is valid or not.
- They are also known to be ‘Ignorant Monkeys’
- Define fewer errors compared to Smart Monkey Testing.
- Can catch bugs or errors that are hard to identify but are critical too.
2. Smart Monkey
- These type of Monkey testers have significant idea about the system or the functionalities.
- These testers navigate through the system and provide valid inputs for testing.
- They are aware of the products functionality.
- One of the good example of load testing, gives quick results.
- Tester is merely focused on breaking the application on finding an error.
3. Brilliant Monkey
- These type of Monkey testers perform testing as per customer’s behavior.
- Can specify probabilities of bugs to be occurred.
- They carry testing based on customer’s perspective.
- It is an advanced version of Smart Monkey Testing.
- For example, Tester who has enough knowledge in Insurance domain will be asked to enter Insurance domain’s inputs.
- Also helps in determining other bugs which may occur in future.
Advantages and Disadvantages of Monkey Testing
Given below are the advantages and disadvantages:
Below are the advantages:
- It is an effective way to find out out-of-the-box errors .
- It is useful to perform load and stress testing.
- The randomness of Monkey testing helps in finding major bugs which can break the system.
- Easy and cost effective to setup and execute it as requires some random input data to run against some random test cases.
- Easy to test the reliability of the software applications.
- As test cases are adhoc, application might get into stress, hence tester can also check for server response.
- Process of it can be automated using tools.
- It can be performed for desktop applications, web applications and also mobile applications.
- Smart Monkeys will be helpful in finding unique bugs.
- Can be accesses by anyone, either a person who has complete knowledge on the application or a person who does not anything regarding the application.
- In case of time crunch and if all the other test are completed, tester can opt for Monkey Testing which allows fixing of bugs quickly.
Below are the disadvantages:
- As Monkey testing is Random, testing often makes impossible to reproduce bugs.
- Bugs found unexpectedly consumes time to analyze and can be challenging.
- For Smart Monkeys, ability to find out bugs depends on state model and developing good one is expensive.
- It can days to find out a bug as there are no predefined test cases while the number of bugs being less.
- Tester cannot define exact test scenario and also cannot guarantee the accuracy.
- Requires good technical experience to make it more accurate.
Though we have seen that Monkey Testing is chaotic, it is recommended to plan and assign some time for its execution. In initial phases of testing, tester may not find bugs, but it can help is discovering memory leak, hardware crash, fault lines which are difficult to find in normal testing. So, by this testing, testers can ensure the needs of the end user and decrease the probability of software breakdown. Here, we have learnt in key features, types and Advantages and Disadvantages of it.
This is a guide to Monkey Testing. Here we discuss the introduction to monkey testing along with the types, advantages and disadvantages. You may also have a look at the following articles to learn more –