In software testing, error guessing is a test method in which test cases used to find bugs in programs are established based on experience in prior testing. The scope of test cases usually rely on the software tester involved, who uses experience and intuition to determine what situations commonly cause software failure, or may cause errors to appear. Typical errors include divide by zero, null pointers, or invalid parameters. Error guessing has no explicit rules for testing; test cases can be designed depending on the situation, either drawing from functional documents or when an unexpected/undocumented error is found while testing operations.
Types of errors
There are countless software defects that may be encountered upon using this technique. However, here are the most common ones, grouped into categories: Implementation-level errors Implementation errors relate to handing specific data conditions.
Computation error: When the program runs but does not work as intended. Domain error: When the branching logic derails the program entirely. Subcase error: When a case that is required is missing. A developer must pay attention to extreme values and limits. Forgetting error: When a variable is hard to keep track on what it is supposed to represent. Edge case error: Rare cases that could involve initial, final, and empty cases. Array bounds error: When there are references to out-of-bounds values in loops. Input stream error: When the program reads past the intended boundary of the given data due to being given faulty input. For example, empty fields between adjacent separators in a token-delimited file. Loop termination error: When a loop's exit is not carefully attended to, causing potential defects that appear under certain use cases rather than all possible loops. UI/UX error: When there are problems with the user interface, experience, and design. Performance error: When the program's time to execute results goes poorly, lags a lot, or simply crashes under too much load. Security error: When there are vulnerabilities that could lead to unauthorized access or data breaches. Compatibility errors: When a program behaves differently across different browsers, devices, operating systems, or environments. User-oriented errors The second category of errors relates to a testers' or developers' inability to give attention to all areas of the program at once. These errors may not always break the program, but they may adversely affect the quality of the code and ability to build off of for future development as well.
Requirements focus error: When there are not enough testing cases that represent all possible test cases of a program. Unexpected user action error: When the user does an action the developer did not account for. Forgetting error: When a variable in the program is hard to keep track of what it is supposed to represent.
History Glenford Myers, an American computer scientist, was the first to document the technique in his 1979 book The Art of Software Testing. He presented the technique as an intuitive method built on the tester's experience. Myers described the technique with a small list of situations that commonly occur across programs. A common example of this is the value zero. Wherever a program accepts input or produces output, zero should be tested as both an input and an output, since zero is a common cause of errors such as division by zero. The empty case should be handled the same way. A program that averages a list of numbers may work as expected but fail when the list is empty, because the count of the list is used as the divisor.
Use in practice Error guessing appears both in the software testing literature, as well as in industrial practice, where it is applied alongside formal techniques like boundary-value analysis and equivalence partitioning. Error guessing is used in conjunction with formal techniques instead of in place of them. How well it works depends heavily on the skill of the tester involved. A more structured form of the technique is the fault attack. This is where the tester writes out a list of defects and failures that seem likely, then designs a test for each one on the list. This is why published catalogs exist. Testing Computer Software, by Cem Kaner, Jack Falk, and Hung Quoc Nguyen, has an appendix that catalogs common software errors. In 2003, Kaner later went on to argue, with Giri Vijayaraghavan, that a catalog like this one is a good source of ideas to test. The tester picks a failure mode from the list and works out what input would cause it. In the same year, James A. Whittaker published How to Break Software. The book is a numbered series of attacks. The first attack tells the tester to supply inputs that force every error message in the program to appear. Later attacks cover input buffer overflows and invalid file names. Video game studios also use open betas as a strategy to find errors, where participants explore the game freely and report feedback as they go. In the same survey, Cristiano Politowski, Fabio Petrillo and Yann-Gaël Guéhéneuc found that studios test their games almost entirely by hand, and that the testers are usually people who already know the game well. Very little of the work is automated.
… excerpt ends here. Continue reading the full article.
