ArticleslgStudy

computer science

Error guessing

Error guessing is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Error guessing rather than just read about it. In short: 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.

Error guessing — main illustration
Error guessing — illustration

Key takeaways

  • Error guessing belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Error guessing to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Error guessing from memory before moving on to harder problems.

Reference excerpt

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.

Worked examples

Example 1 — a first encounter with Error guessing

Start with the simplest possible case. Write down what Error guessing claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Error guessing before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Error guessing ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Error guessing

In research
Error guessing appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Error guessing in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Error guessing is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computer programming, Software testing, so understanding it makes those chapters shorter.
In everyday life
Look for Error guessing outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Error guessing” →

How to study Error guessing in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Error guessing means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Error guessing out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Error guessing in simple terms?

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…

Why does Error guessing matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Error guessing?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Error guessing.

Tags

  • Computer programming
  • Software testing

Keep exploring