Ad hoc testing is an informal activity performed without a script. It is a type of black-box testing that aims to identify loopholes in an application, and it can be done on any part of the application.
In formal testing activities, documentation such as test plans, test suites, and test cases are used, whereas, in ad hoc testing, preparatory documentation is unnecessary. Procedures and results depend entirely on the intuition, observation, and experience of the tester, and the only reporting will be to log bugs that have been identified.
When to Perform Ad Hoc Testing
Ad hoc testing can be performed when a deadline is short, and there is not enough time to undertake exhaustive testing. It is also suitable if the situation cannot accommodate thorough testing involving the usual test plan preparation, test case design, and the application of a range of testing techniques and types. The best time to conduct this type of testing is when a full testing schedule has been completed, as a way of searching out anything that may have been missed or overlooked. There are no restrictions on when ad hoc testing can be performed during the software lifecycle, and one cycle of testing towards the end can help eliminate bugs that have remained unidentified. Experienced testers, with in-depth knowledge of the application, can be the best judge in analyzing the results of the testing.
Types and Techniques of Ad Hoc Testing
Monkey Testing
The basis of this testing depends on the tester’s ability to test the system without any predetermined techniques or methods. Monkey testing has a random approach where a tester provides input and analyzes the corresponding output.
Buddy Testing
Once the unit testing has been concluded, a developer, tester, and maybe one or two more relevant parties sit together and share their knowledge, which allows them to look into the system with a broader perspective. They ‘buddy’ and work together on creating valid test cases to prevent unmissed defects.
Pair Testing
Similar to buddy testing but limited to just two people, pair testing has the same goal. Both testers work together to brainstorm ideas and analyze the system for defects, according to their particular level of expertise and experience.
Examples
- Analyze the behavior of the application on various browsers using different settings where the JavaScript option is disabled.
- Provide inputs to fields that are outside the range and observe the response of the application against those inputs.
- Randomly navigate through the application and check the result by providing a combination of unusual input.
Pros of Ad Hoc Testing
- More bugs can be identified: Compared with other more formal testing methods, this type of testing makes it possible for testers to find defects randomly, that otherwise would have passed undetected.
- No Restrictions: There are no restrictions on when and where this testing can be executed. The tester can conduct ad hoc testing freely wherever they think it will be necessary, and at any stage of the project lifecycle.
- Important for Developers: Due to the randomness of the process, developers find it easy to test an application’s module without creating test cases, which subsequently helps them in writing an effective piece of code.
- Enhanced Test Coverage: Ad hoc testing can be performed alongside other types of testing to improve test coverage for more effective results.
- Time Limitation: If there are constraints on time that prevent thorough testing, ad hoc testing can be a useful addition that can help with coverage.
Cons of Ad Hoc Testing
- Lack of Documentation: Since this type of testing is a randomly performed process and no documentation is maintained, it can become difficult for the tester to keep track of STR’s (step to reproduce an error). It will also be challenging to follow the same steps to reproduce a particular defect. The difficulty level will be increased if there is an interaction between many components, and testers have to recall all the details needed to reproduce a particular bug.
- Lack of Accountability: Ad hoc testing doesn’t have procedures for keeping an account of the time invested and efforts made by the tester. Because the testing is an unstructured activity, finding bugs could take an undetermined amount of time.
- Domain Knowledge: An experienced tester with knowledge of the domain and understanding of an application will be better at executing ad hoc testing in this instance because, for each situation, the tester has to create and execute their test case while testing the application.
Distinguished Features of Ad Hoc Testing
- It is generally conducted after formal techniques have been completed because it works best when all other testing is considered complete, so any missed loopholes can then be identified by using this method.
- It is best performed by an experienced tester who understands the application from various perspectives.
- It helps in identifying critical bugs, which are usually hard to uncover in other techniques.
- Adhoc testing is a less time-consuming technique, whereas other formal approaches consume more time, mostly because documentation usually needs to be prepared.
Conclusion
Ad hoc testing is the only testing technique that can take full advantage of the tester’s creative potential. In this article, we have shown that it can add value to an organization’s overall testing processes, which can be beneficial for the end quality of the application.