Ad hoc testing is a commonly used term for software testing performed without planning and documentation, but can be applied to early scientific experimental studies. The tests are conducted informally and randomly without any formal expected results. The tester improvises the steps and arbitrarily executes them (like a monkey typing while dancing). Though defects found using this method are more difficult to reproduce (since there are no written test cases), sometimes very interesting defects are found which would never have been found if written test cases existed and were strictly followed.
The very term ad-hoc implies the lack of structure or something that is not methodical. When you talk about ad-hoc testing, it means that it is a form of black box or behavioral testing performed without any formal process in place. This is mainly done with the aim of trying to uncover defects or flaws which cannot be captured through traditional or formal processes followed during the testing cycle.
Since ad-hoc testing is more of a “wild-child” testing technique that doesn’t have to be structured, the general recommendation is that it must be performed after the execution of the current test bucket is done. Another point of view is that this could be done when detailed testing cannot be performed due to less time.
When such kind of random testing techniques are performed, it is apparent that the testers perform this without any particular use case in mind with the aim to break the system.Hence it definitely is even more obvious that such intuitive or creative testing methodology requires the tester to be extremely skilled, capable and have in depth know-how of the system. Ad-hoc testing ensures that the testing performed is complete and is particularly very useful in determining the effectiveness of the test bucket.
Types of Ad-hoc testing
Buddy testing- In this form of testing there will be a test member and a development member that will be chosen to work on the same module. Just after the developer completes the unit testing, the tester and developer sit together and work on the module. This kind of testing enables the feature to be viewed in a broader scope for both parties.
Pair testing- In this testing, two testers work together on a module with the same test setup shared between them. The idea behind this form of testing to have the two testers brainstorms ideas and methods to have more number of defects. Both can share the work of testing and making necessary documentation of all observations made.
Monkey testing- This testing is mainly performed at the unit testing level. The tester parses data or tests in a completely random way to ensure that the system is able to withstand any crashes.
Benefits of Ad-hoc testing
- The biggest advantage that stands out is that a tester can find more number of defects than in traditional testing because of the various innovative methods they can apply to test the software.
- This form of testing can be applied anywhere in the SDLC; it’s not only restricted to the testing team. The developers can also conduct this testing, which would help them code better and also predict what problems might occur.
- Can be coupled with other testing to get best results which can sometimes cut short the time needed for the regular testing. This would enable better quality test cases to be generated and better quality of the product on the whole.
- Doesn’t mandate any documentation to be done which prevents extra burden on the tester. Tester can concentrate on actually understanding the underlying architecture.
- In cases when there is not much time available to test, this can prove to be very valuable in terms of test coverage and quality.