1. Home
  2. Blog
  3. Software Testing

Software Testing

Error Guessing in Software Testing: A Checklist and a Real Demo

Error guessing is a test design technique where testers use experience to predict where software will break, then target those spots. Learn how it works, when to use it, a ready checklist of risky inputs, and a pytest demo where guessed inputs exposed 8 failures.

8 min read
Error guessing in software testing: checklist and demo

Key takeaways

  • Error guessing is an experience-based technique: you predict likely mistakes in the code and design tests aimed straight at them.
  • It works best after formal techniques such as boundary value analysis, to catch what the specification never mentioned.
  • Keep a shared checklist of past failures so guessing does not depend on one person’s memory.
  • In our demo, 13 guessed test cases against three small functions produced 8 failures, including one input we did not expect to pass.

Every experienced tester has a list in their head. Empty strings. Leap days. A name with an apostrophe. Pressing submit twice. These are not in the requirements, yet they break software again and again. Error guessing turns that intuition into deliberate test cases.

This guide explains the technique, gives you a reusable checklist, and shows it working on real code. We wrote three small Python functions, guessed where they would fail, and ran the guesses with pytest 9.2 on Python 3.13.6.

What is error guessing?

Error guessing is a test design technique in which the tester anticipates errors, defects and failures based on knowledge and experience, then writes tests to expose them. The ISTQB groups it with exploratory testing and checklist-based testing as an experience-based technique, alongside the black-box and white-box families.

The guesses come from several sources:

  • Bugs found earlier in this product or similar ones.
  • Typical developer mistakes, such as off-by-one errors and missing null checks.
  • Known weak areas, such as date handling, money, text encoding and concurrency.
  • Production incidents and customer support tickets.

Why error guessing works

Specifications describe what should happen. They rarely list the hundred ways input can be wrong. Developers, in turn, tend to test the happy path they had in mind while coding. Error guessing targets the gap between those two views. It is cheap, fast and needs no special tools, which is why it is one of the most widely used techniques in practice, even when teams do not call it by name.

How to do error guessing, step by step

  1. Study the feature. Read the requirements and any existing tests. Note inputs, outputs, states and integrations.
  2. List likely errors. Use your checklist, past defect reports and team knowledge. Ask “what would I get wrong if I wrote this?”
  3. Turn each guess into a test case with a concrete input and an expected result. A guess without an expected result is not a test.
  4. Run and record. Log failures as bugs with clear steps, as described in our bug report guide.
  5. Feed back. Add every new failure type to the checklist so the next feature benefits.

A checklist of risky inputs

Use this list as a starting point and grow it with your own team’s history.

Area Inputs worth guessing
Text Empty, only spaces, leading or trailing spaces, very long, emoji, accents, right-to-left script, apostrophes as in O’Brien, HTML and SQL fragments
Numbers 0, negative, decimal where an integer is expected, huge values, non-digits, digits from other scripts, thousands separators
Dates 29 February, 31st of short months, year boundaries, daylight saving changes, time zones, future and very old dates
Collections Empty list, one item, duplicates, very large lists, unsorted input
Money Rounding, 0.1 + 0.2 style float errors, negative totals, discounts over 100%
Files Empty file, wrong extension, huge file, name with spaces, missing permissions
Users and flows Double click on submit, back button after payment, two tabs at once, session expiry mid-form
Integrations Timeouts, 500 errors, slow responses, malformed JSON, missing fields

Demo: error guessing with pytest

Here are three functions a developer might write quickly for a shopping cart:

def parse_qty(text):
    """Parse a quantity typed into a cart field."""
    return int(text)

def average_rating(ratings):
    return sum(ratings) / len(ratings)

def apply_coupon(total, percent):
    return round(total - total * percent / 100, 2)

Each looks fine on the happy path. Now the guesses. For quantity we tried normal input, padding, empty, a decimal, a negative, letters, Arabic-Indic digits and a huge number, and expected a whole number from 1 to 99. For ratings, an empty list. For coupons, 0%, 100%, 150% and -10%. We used pytest parametrize to keep it compact:

@pytest.mark.parametrize("text", ["3", " 3 ", "", "3.5", "-2", "abc",
                                  "١٢", "99999999999999999999"])
def test_parse_qty_guesses(text):
    q = parse_qty(text)
    assert 1 <= q <= 99

def test_average_empty():
    assert average_rating([]) == 0

@pytest.mark.parametrize("pct", [0, 100, 150, -10])
def test_coupon_bounds(pct):
    assert 0 <= apply_coupon(50.0, pct) <= 50.0

What the guesses found

FAILED test_guess.py::test_parse_qty_guesses[] - ValueError: invalid literal ...
FAILED test_guess.py::test_parse_qty_guesses[3.5] - ValueError: invalid liter...
FAILED test_guess.py::test_parse_qty_guesses[-2] - assert 1 <= -2
FAILED test_guess.py::test_parse_qty_guesses[abc] - ValueError: invalid liter...
FAILED test_guess.py::test_parse_qty_guesses[99999999999999999999] - assert 9...
FAILED test_guess.py::test_average_empty - ZeroDivisionError: division by zero
FAILED test_guess.py::test_coupon_bounds[150] - assert 0 <= -25.0
FAILED test_guess.py::test_coupon_bounds[-10] - assert 55.0 <= 50.0
8 failed, 5 passed in 0.65s

Eight of thirteen guesses exposed a problem: crashes on bad text, negative and absurd quantities accepted, a division by zero on a product with no reviews, and coupons that could make an order cost less than nothing or more than its price.

The most interesting result was a pass. The input "١٢" (12 written in Arabic-Indic digits) returned 12, because Python’s int() accepts digits from many scripts. That may be fine, or it may break a downstream system that expects ASCII. Error guessing surfaced a question nobody had asked, which is just as valuable as a failure.

Fixing and retesting

We fixed the functions to strip spaces, accept only ASCII digits, enforce a 1 to 99 range, return 0 for an empty rating list, and reject coupons outside 0 to 100:

def parse_qty(text):
    text = text.strip()
    if not (text.isascii() and text.isdigit()):
        raise ValueError(f"not a whole number: {text!r}")
    q = int(text)
    if not 1 <= q <= 99:
        raise ValueError("quantity must be 1-99")
    return q

A new suite with pytest.raises(ValueError) for the bad inputs, plus checks for the good ones, finished with 13 passed in 0.19s. Those tests now guard the fixes as part of regression, as our retesting vs regression guide explains.

Tip: write the guess as a failing test first, then fix the code. The test proves the bug existed and proves the fix works.

Error guessing vs formal techniques

Technique Based on Strength
Equivalence partitioning Specification Few tests cover each input class
Boundary value analysis Specification Catches off-by-one errors
Decision tables Business rules Covers rule combinations
Error guessing Experience Finds what the spec never mentioned

The techniques complement each other. Formal techniques give measurable coverage of the specification. Error guessing adds the unknown unknowns on top. Run the formal ones first, then guess.

Pros and cons

Pros: fast, cheap, no tooling needed, finds real-world bugs, and improves as the team learns.

Cons: results depend on the tester’s experience, there is no way to measure coverage, and it is hard to repeat unless guesses are written down. That is why the checklist matters: it turns personal intuition into a team asset.

Tips for better guesses

  • Read old bug reports for the same module before testing.
  • Ask developers which part they found hardest to write.
  • Pair junior and senior testers so experience transfers.
  • Automate good guesses so they run on every build.
  • Combine with exploratory testing sessions and with property-based testing, which generates many unexpected inputs for you.

Error guessing for APIs and web pages

The checklist above focuses on input values. Two other areas reward guessing just as well.

APIs

  • Send the request with a required field missing, then with an extra unknown field.
  • Send a string where a number is expected, and a number as a string.
  • Send the same POST twice quickly. Does it create two orders? Our API idempotency guide covers the fix.
  • Use an expired or malformed token, and a token from another user.
  • Ask for page 0, page -1 and a page far beyond the end.
  • Send a body larger than the server limit, or invalid JSON.

Web pages

  • Paste text with leading spaces into every form field.
  • Refresh the page in the middle of a multi-step form.
  • Open the same record in two tabs, edit both and save both.
  • Zoom to 200% and switch to a narrow phone width.
  • Turn off the network just before pressing save.

These are classic failure points that formal techniques rarely cover, and each takes seconds to try. Record the ones that fail in your own checklist so they become standard test cases.

Final thoughts

Error guessing is simple: think about how the code could fail, then test exactly that. It is not a replacement for systematic techniques, but it reliably finds the bugs they miss. Start with the checklist above, write each guess as a test with an expected result, and add every new failure back into the list. Over time, your team’s guesses become remarkably accurate.

FAQ

What is error guessing in software testing?

It is an experience-based test design technique where testers predict likely defects from past bugs and common mistakes, then write tests targeting them.

Is error guessing black box or white box?

It is classed as experience-based. It usually treats the system as a black box, but knowledge of the code can improve the guesses.

When should error guessing be used?

Use it after formal techniques such as equivalence partitioning and boundary value analysis, to catch errors the specification did not describe.

What are examples of error guessing?

Entering an empty field, a negative quantity, 29 February, a very long name, double clicking submit, or a coupon over 100 percent.

What is the main weakness of error guessing?

Its quality depends on the tester and coverage cannot be measured. A shared checklist of past failures reduces that weakness.

Keep learning

Work with Stack Quora

Need help with testing, WordPress or SEO?

We help teams ship better software and grow their sites. Tell us what you are working on and we will suggest a clear next step.

Keep reading

More guides on testing, AI & modern development

Enjoyed this article? Pick a topic and jump straight into our newest tutorials.

Artificial Intelligence

Jaccard Similarity: Formula, Python, MinHash

Jaccard similarity measures overlap between two sets as intersection over union. Work the formula, compute it in Python for words…

Read article →
Software Development

Unix Timestamp Explained: Seconds vs ms

A Unix timestamp counts seconds since 1 January 1970 UTC. Learn seconds vs milliseconds, converting in Python, JavaScript and SQL,…

Read article →
DevOps

Git Hooks: Pre-commit and Commit-msg Examples

Git hooks run scripts at key moments such as commit and push. See tested pre-commit, commit-msg and prepare-commit-msg hooks, sharing…

Read article →
Test Automation

API Testing in Python: Pytest + Requests Suite

Build an API testing suite in Python with pytest and requests: fixtures, status codes, headers, JSON schema validation, CRUD flows,…

Read article →
Software Testing

Test Design Techniques: 9 Methods + Examples

Test design techniques help you write fewer tests that catch more bugs. Learn 9 black-box, white-box and experience-based methods with…

Read article →
Databases & SQL

SQL Temporary Table: Create, Use and Drop It

SQL temporary tables store interim results for one session. Learn syntax for SQL Server, PostgreSQL, MySQL, Oracle and SQLite, session…

Read article →
Databases & SQL

SQL CROSS JOIN: Every Combination + Examples

SQL CROSS JOIN returns every combination of rows from two tables. See the row math, product variants, calendar grids that…

Read article →
Software Development

JavaScript Date: Format, Parse, Timezone Bugs

JavaScript Date explained with tested Node.js code: zero-based months, the date-only UTC parsing trap, toISOString, getTimezoneOffset, Intl formatting, date math…

Read article →
Software Development

Python Requests: GET, POST, Timeouts, Retries

Python requests explained with code tested against a local API: GET with params, POST json vs data, headers and auth,…

Read article →
Software Development

Python Deepcopy vs Copy: Fix Nested Lists

Python deepcopy vs shallow copy explained with tested code: aliasing, nested lists, the [[0]*3]*3 trap, memo and cycles, custom __deepcopy__,…

Read article →
Artificial Intelligence

TF-IDF Explained: Formula and Worked Example

TF-IDF scores a word by how often it appears in a document and how rare it is across all documents….

Read article →
Software Development

Base64 Encoding Explained, With Python Code

Base64 encoding turns bytes into 64 safe text characters. See the bit-level steps, padding, URL-safe base64, the 33% size cost,…

Read article →
DevOps

Git Tag: Create, Push and Delete Release Tags

Git tag explained with tested commands: annotated vs lightweight tags, listing and sorting, pushing with follow-tags, deleting local and remote…

Read article →
Test Automation

Pytest Coverage: pytest-cov and Branch Gaps

Measure pytest coverage with pytest-cov: term-missing reports, branch coverage, HTML reports, pyproject settings and a fail-under gate for CI, with…

Read article →
Software Testing

Error Guessing in Testing: Checklist + Demo

Error guessing uses tester experience to predict where code breaks. Get a ready checklist of risky inputs, a step by…

Read article →
Databases & SQL

SQL LAG and LEAD: Compare Rows, 5 Examples

SQL LAG and LEAD read values from the previous or next row without a self join. Five tested examples: change,…

Read article →
Databases & SQL

SQL STRING_AGG: Combine Rows Into One String

SQL STRING_AGG joins values from many rows into one string per group. See syntax for PostgreSQL, SQL Server, MySQL GROUP_CONCAT,…

Read article →
Software Development

JavaScript Classes: Private Fields and Extends

JavaScript classes explained with tested Node.js code: constructors, methods, #private fields, getters, static members, extends and super, plus the errors…

Read article →
Artificial Intelligence

BM25 Explained: How Keyword Search Ranks Results, With Python Code and Hybrid Search

BM25 explained with a pure Python implementation we ran: the formula, IDF, term saturation, the k1 and b parameters, why…

Read article →
DevOps

Git Bisect Explained: Find the Commit That Broke Your Code, Manually or Automatically

Git bisect explained with a tested repository: find the one bad commit among 41 in 5 test runs, automate it…

Read article →
Test Automation

pytest Markers Explained: Custom Marks, skip, skipif, xfail and -m Filters

pytest markers explained with a tested suite: register custom marks, run only smoke tests with -m, combine filters with and,…

Read article →
Software Testing

Positive vs Negative Testing: Differences, 24 Real Test Cases and a Checklist

Positive vs negative testing explained with a real signup form: 6 positive and 18 negative test cases run in pytest,…

Read article →
Databases & SQL

SQL ORDER BY Multiple Columns: ASC, DESC, NULLS LAST, Case and Custom Order

SQL ORDER BY with multiple columns explained with tested queries: mixed ASC and DESC, tie-breakers, NULLS FIRST and LAST, case-insensitive…

Read article →
Databases & SQL

SQL Running Total: SUM OVER, Per-Group Totals, Moving Sums and the RANGE Trap

How to calculate a SQL running total with SUM() OVER: per-group totals, daily cumulative sums, moving sums, percent of total,…

Read article →
Artificial Intelligence

Cosine Similarity Explained: Formula, Worked Example and Python Code

Cosine similarity explained simply: the formula, a worked example by hand, pure Python and NumPy code, cosine vs Euclidean distance…

Read article →
DevOps

Git Squash Commits: 4 Easy Ways, Tested Step by Step (rebase -i, reset, merge)

Git squash commits explained with 4 tested methods: interactive rebase, reset –soft, merge –squash and fixup with autosquash. Before-and-after logs,…

Read article →
Test Automation

pytest parametrize Explained: 7 Patterns with Tested Examples

pytest parametrize explained with 7 tested patterns: basic cases, readable ids, stacked decorators, pytest.param with xfail and skip, indirect fixtures…

Read article →
Software Testing

Retesting vs Regression Testing: 8 Key Differences with a Real Bug Fix Example

Retesting vs regression testing explained with a real bug fix run in pytest: retesting confirmed the fix, the regression run…

Read article →
Artificial Intelligence

RAG Chunking Strategies Explained: Fixed, Overlap, Sentence, Recursive and Headings, Measured

RAG chunking strategies compared on one document with tiktoken 0.14: fixed-size, overlap, sentence packing, recursive splitting and heading-based chunks, measuring…

Read article →
DevOps

Git Stash Explained: Save, Apply, Pop and Untracked Files, Tested

Git stash explained with commands we ran on Git 2.56: push with a message, untracked files, list and show, apply…

Read article →
Software Testing

Pairwise Testing Explained: How All-Pairs Cuts 216 Tests to 13, Tested

Pairwise testing explained with a generator we ran in Python 3.13: a checkout with 216 combinations covered by 13 tests,…

Read article →
Test Automation

Test Doubles Explained: Dummy, Stub, Spy, Mock and Fake, with Tested Python Code

Test doubles explained with one Python example run in pytest 9.2: dummy, stub, spy, mock and fake, when to use…

Read article →
Artificial Intelligence

LLM Context Window Explained: Tokens, Limits and How to Fit More, Measured

The LLM context window explained with token counts we measured using tiktoken: words vs tokens for prose, code and Hindi,…

Read article →
DevOps

Git Cherry-Pick Explained: Copy the Commit You Need, Safely, Tested

Git cherry-pick explained with commands we ran in Git 2.56: copying a hotfix to a release branch, new hashes and…

Read article →
Test Automation

Snapshot Testing Explained: How It Works, When It Helps and When It Hurts

Snapshot testing explained with a pytest and syrupy demo we ran: creating snapshots, reading the diff after a code change,…

Read article →
Software Testing

Mutation Testing Explained: Why 100% Coverage Still Missed Our Bug

Mutation testing explained with a small mutation tool we built and ran: 14 mutants, a test suite with 100% line…

Read article →