What is Monkey Testing? Features, Types With Examples

Monkey testing is a crucial testing method that is done to authenticate the functionality of the product application. Monkey testing is done to ensure that the specifications given by the client are properly addressed in the software.
Monkey testing is a kind of black box testing. This testing is done when the tester is the time deficit in order to write and execute the function.
monkey testing
There are many names given to this testing pattern as Random testing, Monkey Testing, Fuzz Testing, and the technical name is Stochastic Testing.
This testing works well in case of androids, desktops, web and other mobile applications.
In this testing, there is no predefined strategy or algorithm and hence the testing works on tester’s gut and mood. Monkey testing is more efficient while doing stress testing.

ORIGIN OF MONKEY TESTING

It was first used in 1983 to test the software on Mac. These programs were Macwrite and Macpaint. The original Mac had the scarcity of memory.
monkey testing
After the program was completely initiated, there was a lesser amount of memory left than required to perform the test. So Macwrite and MacPaint used buffers those were quite larger than the size of the screen of the desktop. So it became essential to create some testing method that acquired lesser memory.
So Steve Capps used Monkey program to enter random inputs to Macwrite and Macpaint. The Monkey functioned parallel to the other programs, data entry running in the system.
This would perform faster than a regular user as if a monkey was showing the swiftness in him. Hence the team decided to set up commands, window events, menu clicks so that it can target the requirements of the tester.
The term monkey testing was first seen in the book ‘The Art of Software Testing’ written by Glenford J. Myers in 1979. It is a very famous technique among software engineers.
Monkey testing is a software testing technique in which the operator provides the software with some random inputs in order to analyze the behavior of the software.

It also finds out whether the system or application will work properly under such conditions or crash. The testing is usually used by the tester at the beginner’s level.

FEATURES OF MONKEY TESTING

Listening to the term Monkey Testing gives the vision of monkeys thumping on the keys of the keyboard and working as a computer expert, writing functions and other content.
All the random thrust on the keyboard may result in brilliant work as it may hit all possible combinations. It all may sound good. Going deeper into this theory, let us understand monkey testing.
Monkey testing is an automated test, which is done without any specification in mind. The main purpose of the test is to find out errors and bugs in the software to ensure the complete development of the product.

There are Some Other Features of Monkey Testing:

  • There is no specification while performing this test.
  • It focuses on crashing the system by hitting random inputs so that the security can be ensured once the product is complete.
  • The testing is done in the system where the errors are not identified at regular intervals.
  • The time and effort that is required are comparatively lesser in this kind of testing.
  • It ensures the reliability and efficiency of the system.

Example/Types of Monkey Testing

In this process of testing the tests are chosen independently from the test domain and are performed depending upon the tester’s requirement.
After the test, the team tries to replicate the error, once the issue is detected and fixed.
Monkey testing is categorized into three major kinds. Each of these focuses on different aspects of the programs and clears bugs from that particular genre.
monkey testing

1. DUMB MONKEY TESTING

Dumb monkey testing technique or ignorant monkeys, as the name specifies, inculcates a tester who has no knowledge of the application, its features, functions, working behavior or bugs.
They do not have any clue if the provided inputs are valid or invalid. It is the simplest testing which does not require the tester to know about the characteristics or qualities of the software or of the test flow.
The dumb monkey does not know the flow of work or the type of data being fed to the application or the system.
This determines fewer errors as compared to Smart monkey test. This test can catch the bugs that are harder to identify but are critically important too.

2. SMART MONKEY TESTING

Smart Monkey testing is another variant of monkey testing in which testing is performed by testers or group of testers who has a deep understanding of the workflow of software/application
The smart monkey test is aware of the locations of test and is well aware of the page they will be redirected to.
In this type, the tester is more focused on breaking an application and when they find an error, they are aware enough to report the bug.
This is an ample example of load testing. The impressive part is that this type of test gives the tester quicker results than that of its counterpart.

3. BRILLIANT MONKEY TESTING

The brilliant word suggests an advancement to the word smart. This is also true in case of these techniques, the brilliant monkey testing is an advancement in the smart monkey testing technique.
A tester or a team of testers is assigned for the task, ensuring that they have complete knowledge about this software domain and its functionalities.
Example: The tester who has sufficient knowledge of the banking sector may be asked to enter the banking domain’s data.

  • The tester knows well about the usage of the program and also the way other users handle it. So they carry out the testing from the user’s perspective.
  • It is an extension of the smart monkey testing technique.
  • It can also help in determining other bugs that may occur in the future span of its functioning.

Also Read: Black Box Testing – Techniques, Examples and Types 

ADVANTAGES AND DISADVANTAGES 

Monkey testing caters to the needs of an organization in chasing the out-of-the-box errors. It has both advantages and disadvantages as like every other entity.
Here are a few to add up to its advantages:

  • Usually, the software testing that is performed is ad-hoc but monkey testing can also help the tester to unwind the burden under the stress testing condition. Also if the tester does not have much knowledge about the application, this testing can rescue.
  • The deep-rooted randomness can sometimes save the system from complete breakdown by identifying the major bugs.
  • Being easy to follow monkey testing caters another advantage. Smart monkeys can help find unique bugs if set up with proper and accurate state model, quickly.
  • It has a great advantage that it can be accessed by anyone, one who may have knowledge of the file or who do not. Evidently, they will not be able to understand the appropriateness of the result, but still, they will not face any problem to perform it.
  • In an unintended way, it also allows the domain tester to judge the response of the program. But as the test pattern is unplanned the software may come under stress and will affect the server.
  • The cost-effectiveness makes this software more advantageous than others.
  • In case of a time crunch, if all the other test have been performed, the tester can opt for monkey testing that will allow quick fixing of the bugs.


There are Several Disadvantages that can Overshadow its Positive Points:

  • The test input values provided in monkey testing are so random that it becomes very difficult to reproduce the bugs and errors.
  • The occurrence of unexpected bugs makes it more difficult to analyze and resolve the bugs.
  • It may run for a long time before the commencement of the test, which reproduces unnecessary bugs which may again be time consuming and irrelevant.
  • It comprises accuracy as it is not able to recreate the same environment of the test.
  • The smart monkey can be efficient when provided with the state model but it also becomes expensive in that case.

Difference Between Monkey Testing and Ad-hoc Testing

  • The main difference between ad-hoc testing and monkey testing is that the former is carried out without any documentation or planning.
  • It focuses on breaking the system into subparts and finding out the bug in that particular subpart and resolve it. So that the functionality could be maintained. This is opposite to the functioning line of Monkey testing.

Difference Between Monkey Testing and Gorilla Testing

  • The other difference can be seen in gorilla testing and monkey testing. Here the former is performed on limited features and modules to analyze their functionalities, whereas the latter focuses on breaking down of a complete system to identify the bugs.

MONKEY TESTING TOOLS:

There are many tools which make it possible to perform the automated test efficiently.
They are developed to generate random data so that all the faults and flaws can be reported in the application. The generation of monkey testing tools requires some good amount of efforts but once they are done, they perform efficiently with automation.

1. For Android- MonkeyRunner Tool:

  • MonkeyRunner android tool is designed to work aptly with androids.
  • The tester can easily install and execute an android program, send it data files and store them in the computer using the Python program.
  • The tester can also control and access to the Android device by using an application program interface(API) provided by the tool.
  • As the MonkeyRunner tool is used to perform the framework level of testing and functional test, it can also be used to random testing test suites.

2. On android – U/I Application Exerciser Monkey:

  • This application is quite different from the MonkeyRunner tool, which controls the android device from exterior to the android code while U/I Application exerciser monkey runs inside the emulator.
  • It can also be used to develop the system and user events in the quasi random stream.

CONCLUSION

Monkey testing evidently, has differences with regard to the working of a monkey as it can completely analyze the function and will not do anything improper or irrelevant with the system.

The end user who uses any application or software is not expected to have the functional knowledge of the same. So by this testing, we can ensure the fulfillment of the needs of the user and decrease the probability of the awful breakdown of the software and system.
We can say that as it is not always possible to regenerate the bugs, it becomes almost difficult and sometimes impossible for us to reproduce the same found bug. It is very time-consuming work that requires a lot of effort, therefore we cannot recommend Monkey testing in the initial stages of the testing.
Later when the other test is done it can be opted to find the other issues such as the software and hardware issues, fault lines and memory leaks which are difficult to find in normal testing.
So we can say that one could opt for this particular kind of test if they lack in time and have performed other required test. Also one needs to ensure that the application is highly stable and can be reproduced as it focuses on the crash of the entire system.

What is Exploratory Testing in Software Testing?

Exploratory testing is a process where testers can be creative in exploring the software without knowing much about the working of the system. let’s dig deep

What is Exploratory Testing?

It is a testing approach where you explore the system and venture into those aspects and functionalities which may or may not directly affect the system’s outputs, in order to find underlying errors.

It is all about exploring the system, discovering hidden errors, investigating their cause, and rectifying them. There are no pre-defined test cases formed in exploratory testing and therefore the testers explore the system aimlessly in hopes to find unforeseen bugs.

Exploratory Testing

The purpose of performing exploratory tests is to learn more about the system and its functionality and using your existing knowledge about the system to find errors.

Testers need to be very creative and innovative in order to perform exploratory testing as the aim is to test the system for unexpected errors using unexpected techniques.

Even though there are no pre-defined test cases, testers may note down or document their ideas and things they want to test before performing the test.

Description of exploratory testing techniques?

There are different ways the process can be done. Based on that it can be divided into 3 main types as below:

  1. Freestyle Testing: As the name suggests, this is ad-hoc testing where-in each tester picks up a module or the entire application and randomly runs through the application. It is like a quick smoke test done to ensure everything is as expected.
  2. Scenario-based testing: In this type of exploratory testing, each tester picks up a user scenario and tests the application flows around that use case. They try to cover as many navigations, data permutations, and flow as possible to ensure the stability and functionality of that scenario.
  3. Strategy-based testing: This type of testing involves implementing the core testing methodologies into an exploratory test. In this test, the experienced tester would apply techniques like BVA (boundary value analysis), equivalence techniques, and more to the objects in the application.

How is functional exploratory testing different from structured exploratory testing?

1. Flow of the test

In structured testing, the flow of the test is directed by test cases that are prepared ahead of time.

Test cases are not determined in advance in exploratory testing and the flow is directed from exploring the system.

2. The objective of testing

The main objective of structured testing is to find foreseen errors whereas in exploratory testing the aim is to learn about the system and gain knowledge about its functionality.

3. Nature

Structured testing is predictive in nature as the flow of the test is predicted in advance.

Exploratory testing is spontaneous and investigative in nature. Tests are performed on a proper investigation is conducted.

4. The end results

The end results of structured tests are known and anticipated. However, the end results in exploratory tests are unknown and unexpected.

Wish to know about the types of software testing? Read here

When to use exploratory testing?

The process is mostly standalone and can not be used to confirm the quality of any software product, it is always used to supplement the other testings. Some of the situations where exploratory testing will be very fruitful and helpful are:

  1. To understand how the application works including the look and feel.
  2. In cases where the testing bandwidth is very crunched, exploratory testing may be performed on the least critical or rarely used modules of the application
  3. Check out the new features and changes in the application after each new release.
  4. To help new testers to understand the application, and also to test the application from a fresh perspective
  5. To supplement the structured testing towards the end of the testing phase

Exploratory Testing Process

1.      Learning

This is the first step of exploratory testing and one which is very crucial. Learning about the system is important because you will be able to better analyze all the minor and major functionalities of the system and check it for bugs.

Your knowledge about the system will help you explore the system and create test designs and plans accordingly.

Unless you do not have knowledge about the system you will not be able to explore it in detail.

2.      Test Design

Tests designs are created spontaneously during exploratory testing and there is no need for documentation of test cases, scripts and the conditions of the test.

3.      Test Execution

Test execution is performed along with test designing. As soon as you plan and design your test you execute it without waiting for formal documentation. Only the key components of the test are recorded like the bugs that are detected or ideas for the next test.

4.      Analysis

When some bugs are detected on exploring the system, proper analysis and feedback are made in order to rectify the errors.

The previous test result feedback helps testers to prepare for future tests and apply logical reasoning to guide the future of the software testing life cycle.

Advantages of Exploratory Testing

  1. During the process, there is no preparation time required before a test. It saves a lot of time and effort from the testers as they can focus solely on exploring and learning about the system rather than preparing test cases and documentation.
  2. It allows testers to find critical and hidden bugs and errors that cannot be found through formal testing approaches. All the bugs which do not directly affect the system outputs and get overlooked during initial testing can be detected through exploratory tests.
  3. The results of the previous tests help testers guide their future tests and explore the system in a better and more detailed way. This speeds up the testing process and testers are able to find more bugs easily.
  4. Exploratory testing helps testers gain in-depth knowledge about the system. When a bug is found they can learn its scope, size, nature, etc., and provide better solutions to the developers.
  5. When the system under test is intricate, complex, and vast, exploratory testing may generate better results and prove to be more efficient in finding bugs than formal testing techniques.
  6. When there is very little time for testing a system, exploratory testing is the best way to detect bugs quicker and in more efficient ways. Lots of time is saved when the documentation process is eliminated.
  7. The most significant advantage of exploratory testing is that it helps testers learn about the system. Testers are able to develop and test the system for different scenarios and get to know how the system will perform under such circumstances.

Disadvantages of Exploratory Testing

There are some disadvantages related to exploratory testing which make it a little harder to implement.

  1. The tests that are performed during exploratory testing are spontaneous and not documented which makes them hard to review and keep for future references.
  2. Since there is no documentation involved, keeping a track of the tests performed and the functionalities already explored is difficult.
  3. Repeating a test performed during exploratory testing the exact same way again is not possible. This is a huge disadvantage when you need to repeat a test to find a specific error found in a previous test.
  4. Challenges in exploratory testing

    There are some challenges in exploratory testing because it is not structured. Let us check out some of the major challenges:

    1. Issue Reproduction: once an issue is found, it may be difficult to reproduce it, since there are no defined steps that the tester followed. To avoid this tester would either enable recording in the device.
    2. No Exit Criteria: It is difficult to decide when to stop the testing as there are no defined tasks that need to be completed before concluding the tests.
    3. Uncertainty in test coverage: There are no defined documents or procedures to capture what is tested and what is not tested. Hence the test coverage can not be determined
    4. No defined metrics or reports: There are no formal metrics or reports to substantiate the amount of testing or the success of the testing activity. Many times it becomes a challenge to convince the management of the effort involved and the purpose.

Steps in exploratory testing

Exploratory testing does not follow a particular structure; however, there are a few steps that are common to each exploratory test. The preparation of exploratory tests is a 5 step process:

1.      Learning and classifying errors

The first stage of exploratory testing is gathering the results of the previous exploratory test in order to learn the errors found in the past projects. Testers need to analyze these errors and understand the root causes of the bugs so that they can develop a test plan or strategy to test their system.

2.      Test Charter tool

Test charter is a tool that is used to run exploratory tests. The stakeholders define the scope of the test and risks that need to be found using the test charter. Thus the charter should tell testers the following things:

  • What tests should be performed
  • How the system can be tested
  • What risks should be focused on while exploring the system

3.      Time Box

Time Boxing is the practice of setting a fixed amount of time known as a timebox during which a tester or a team of testers work together to find bugs. The time box session should not be interrupted and the testers should only focus on testing the system.

The testers working in pairs or groups can come up with the most creative exploration techniques and device efficient solutions to the errors found.

4.      Analyzing the results

Once the testing process is completed, the results of the test are reviewed. The defects found are evaluated and testers learn the causes of the defects in order to come up with the best solutions.

5.      Feedback

The results are compiled and compared with the charter. This helps testers identify whether they have tested the system according to the stakeholder’s needs and demands.

Things to keep in mind for exploratory testing

1.      Understand the main aim of testing

Exploratory testing is all about learning about the system and understanding its core functionality by exploring unexpected system paths. During this process, certain unforeseen bugs are detected.

2.      Planning the test is very important

Although test cases are not pre-defined during exploratory testing, it does not mean that exploratory tests are completely unplanned. Testers study the system and previous test results in order to figure out and plan their test. This helps them save a lot of time as they know what they are looking for.

3.      This is skill-based testing

Testing skills are an essential part of exploratory testing. Testers completely rely on their skills in order to explore the system and test it for defects. Therefore exploratory testers should be highly skilled and have good knowledge of all software testing techniques.

4.      Keeping a record of the test can be very beneficial

Even though exploratory tests are not documented, recording the findings, results, and defects found or any other outcomes of an exploratory test can be very beneficial.

5.      Exploratory testing should be a team activity

It is always better to perform exploratory tests in pairs or in a team. This helps testers to come up with better test plans, exploration techniques, and solutions to the defects found.

Top 10 Ideas for exploratory testing

10 Tips for exploratory testing

Wish to know about various QA methodologies? Read here

Example for Exploratory testing

The below image is an indication of how test cases are created for checking out the functionality of a web app. 

Exploratory testing example

Exploratory testing documentation

  • Keeping documented through notes is an effective way.

Eg:  *NEW* /LIVE/ “Browser: Login with  Gmailfirefox” (23-july-2021 09:44:20)

newUser@gmail.com

Client id = 357

https://mail.google.com/mail/u/0/#inbox

Login page displayed => OK

Previous account name displayed => OK

Login => OK

Logout Button available => OK

</OK>

  • Mind Map style

You can use web-based tools such as XMind7 to document the process.  The conventional mind mapping technique would not work in this case.  Create all the test cases as nodes and can be saved into a template. Data such as environment, date, execution browser, time,  the theme of the site, input data, environment, output data

Exploratory testing vs ad-hoc testing

Exploratory Testing

Adhoc Testing

Testing is carried out without much knowledge about the software but in a formal way

Complete freedom in testing the software

Documentation is mandatory

Not that important

Charter directed testing

No particular plan

Maximum test cases are executed

No need for test cases

Form of positive testing

Form of negative testing

Helps in learning the application

Helps in developing innovative ideas in testing

Does not need much time to commence

Needs preparation time

 

Conclusion

It overcomes all the shortcomings of structured testing. It helps testers detect errors that go unnoticed during scripted tests as they do not directly affect the outcome or working of the system.

This is the reason exploratory testing has become a very popular testing approach, especially for complicated systems. Exploratory testing has many advantages over scripted testing and helps testers focus on gaining knowledge about the system.