1. Home
  2. Blog
  3. Software Testing

Software Testing

Test Design Techniques: 9 Methods That Catch More Bugs With Fewer Tests

Test design techniques turn requirements and code into a small set of test cases that still find real defects. Learn nine black-box, white-box and experience-based methods with examples, and see a demo where each technique caught a different seeded bug.

10 min read
Test design techniques: 9 methods with examples

Key takeaways

  • Test design techniques fall into three families: black-box (from the specification), white-box (from the code) and experience-based (from tester knowledge).
  • Our simple loan rule had 48,400,242 possible inputs. Six to eight designed cases per technique were enough to expose real bugs.
  • In our demo, only boundary value analysis caught an off-by-one age bug. Equivalence partitioning and the decision table both missed it.
  • No single technique is enough. Combine them, starting with the ones that match your biggest risks.

You cannot test every input. Even a form with three fields can have millions of combinations. Test design techniques are systematic ways to choose a small set of test cases that still represents the whole space, so you spend effort where bugs actually hide. They are the core of the ISTQB Foundation syllabus, and they work just as well for manual testers writing cases as for engineers writing automated tests.

This guide covers nine techniques across the three families, with a running example. At the end, we run a small Python demo that seeds three bugs into the example and shows which technique caught which. The demo ran on Python 3.13.6.

Why test design techniques matter

Ad hoc test cases tend to cluster around the happy path and miss edges. Techniques give you three things ad hoc testing lacks: coverage you can explain (“we tested every partition and boundary”), efficiency (fewer redundant cases), and repeatability (another tester following the same technique gets similar cases). They also make reviews easier, because you can point at the missing partition instead of arguing about gut feelings.

The three families

Family Based on Techniques in this guide
Black-box (specification-based) Requirements and behaviour Equivalence partitioning, boundary value analysis, decision tables, state transition, use case testing
White-box (structure-based) The code’s structure Statement coverage, branch coverage
Experience-based Tester knowledge and intuition Error guessing, exploratory testing

Our black-box vs white-box guide compares the first two families in depth.

Our running example

A loan eligibility rule: applicants aged 18 to 65 inclusive qualify if their monthly income is at least 25,000. Existing customers need only 20,000. Inputs are age (0 to 120), income (0 to 200,000 in whole units) and customer status (yes or no). That is 121 × 200,001 × 2 = 48,400,242 possible combinations, as our script computed. Nobody is testing all of those.

1. Equivalence partitioning

Split each input into groups (partitions) that the system should treat the same way, then test one value from each. For age: below 18, 18 to 65, above 65. For income: below 20,000, 20,000 to 24,999, and 25,000 or more, crossed with customer status where it matters.

We picked six cases: age 10, 40 and 70 with a high income, plus age 40 with incomes of 10,000, and 22,000 as customer and non-customer. Equivalence partitioning removes redundancy: testing age 30, 31 and 32 adds nothing if they are in the same partition. See our equivalence partitioning guide for valid and invalid partitions.

2. Boundary value analysis

Bugs gather at the edges of partitions, where a developer writes > instead of >=. Boundary value analysis tests the values on and next to each edge: ages 17, 18, 65 and 66, incomes 24,999 and 25,000 for non-customers, and 19,999 and 20,000 for customers. That gave us eight cases. Our boundary value analysis guide covers two-value and three-value variants.

3. Decision table testing

When the outcome depends on a combination of conditions, list every combination in a table. Our rule has three conditions: age in range, income high enough for a non-customer, and existing customer. That is 2 × 2 × 2 = 8 rules:

Age OK Income 25,000+ Customer Eligible?
Y Y Y Yes
Y Y N Yes
Y N (22,000) Y Yes
Y N (22,000) N No
N any any No (4 rules)

Decision tables shine at catching missing or contradictory business rules. Our decision table testing guide shows how to collapse rules that do not matter.

4. State transition testing

Use this when behaviour depends on what happened before. A loan application might move through Draft → Submitted → Approved or Rejected, with Withdrawn allowed only before a decision. Draw the states and transitions, then test every valid transition and the important invalid ones, such as approving a withdrawn application. Login lockout after three failed attempts, order status and subscription renewals are classic state machines.

5. Use case testing

Use case testing follows a user goal from start to finish: “an existing customer applies for a loan and receives a decision”. Test the main success path, then each alternative and exception path, such as an invalid document upload or a session timeout. It catches integration problems between screens and services that unit-level techniques miss, and maps naturally to end-to-end tests and acceptance testing.

6. Statement coverage

A white-box technique: design tests so every executable statement in the code runs at least once. It is the weakest structural measure, because a line can run without its decision being fully exercised, but it reliably finds dead or untested code. Tools such as coverage.py measure it for you, as shown in our pytest coverage guide.

7. Branch (decision) coverage

Branch coverage requires every decision to evaluate both true and false. It is stronger than statement coverage: an if without an else can reach 100% statement coverage with one test, but branch coverage demands a second test where the condition is false. Aim for branch coverage on critical logic such as pricing, permissions and eligibility rules like ours. Our code coverage guide explains the stronger condition and path coverage too.

8. Error guessing

Experienced testers predict likely mistakes: empty fields, negative numbers, leap days, double submits, very long names. Error guessing turns those predictions into test cases on top of the formal techniques. For our rule: age as a decimal, income with a comma separator, or a missing customer flag. Our error guessing guide includes a reusable checklist.

9. Exploratory testing

Exploratory testing is simultaneous learning, test design and execution, usually in time-boxed sessions guided by a charter such as “explore how the loan form handles edits after submission”. It finds usability problems and unexpected interactions that scripted tests never consider. Record notes and turn the useful discoveries into scripted regression tests. See our exploratory testing guide.

Demo: which technique caught which bug?

We coded the loan rule in Python, wrote the cases for the first three techniques, and ran them against the correct version and three bugged versions:

  • Age bug: age > 18 instead of age >= 18.
  • Income bug: income > need instead of income >= need.
  • Discount bug: the existing customer rule is ignored.
exhaustive inputs (age 0-120, income 0-200000 step 1, customer y/n): 48400242
EP              cases= 6  clean_fail=0  age_bug_caught=0  income_bug_caught=0  discount_bug_caught=1
BVA             cases= 8  clean_fail=0  age_bug_caught=1  income_bug_caught=2  discount_bug_caught=1
Decision table  cases= 8  clean_fail=0  age_bug_caught=0  income_bug_caught=0  discount_bug_caught=1

The numbers are failing test cases per bug. What the run shows:

  • All three suites passed on the correct code (clean_fail=0), so none raised false alarms.
  • Only boundary value analysis caught the off-by-one bugs. Equivalence partitioning used age 40 and income 30,000, safely inside the partitions, so it could not see the edge.
  • All three caught the missing discount rule, because each included an existing customer with an income between 20,000 and 25,000.
  • Each technique used 6 to 8 cases, compared with over 48 million possible inputs.

The lesson: techniques are complementary. Partitions and decision tables check the logic of the rules; boundaries check the exact edges. Use them together.

Tip: combine partitions and boundaries into one table per input. Each row is a partition with its boundary values, which keeps both techniques visible in a single review.

How to choose techniques

Situation Start with
Numeric ranges and input fields Equivalence partitioning + boundary values
Complex business rules Decision tables
Workflows and statuses State transition
User journeys Use case testing
Critical code paths Branch coverage
Many independent parameters Pairwise testing
New or poorly specified features Exploratory testing + error guessing

Let risk guide the depth: apply more techniques, more thoroughly, to features where a failure costs the most. Our risk-based testing guide explains how to rank them, and how to write test cases shows how to document the result.

Final thoughts

Test design techniques replace guesswork with method. Black-box techniques cover the specification, white-box techniques confirm the code is exercised, and experience-based techniques catch what neither foresaw. Our small demo showed the payoff: a few designed cases per technique exposed bugs in a space of 48 million inputs, and only the combination caught all three. Pick techniques by risk, combine them, and keep the cases you design as living regression tests.

FAQ

What are test design techniques?

They are systematic methods for choosing test cases, grouped into black-box techniques based on requirements, white-box techniques based on code, and experience-based techniques based on tester knowledge.

What are the main black-box test design techniques?

Equivalence partitioning, boundary value analysis, decision table testing, state transition testing and use case testing.

Which test design technique is best?

None is best alone. Boundary value analysis finds edge bugs, decision tables find rule gaps and exploratory testing finds surprises. Combine them according to risk.

What is the difference between statement and branch coverage?

Statement coverage requires every line to run. Branch coverage also requires every decision to be both true and false, so it is stronger.

Are test design techniques part of ISTQB?

Yes. The ISTQB Foundation syllabus covers black-box, white-box and experience-based techniques. Version 4.0 includes eight of the nine methods here, while older versions also covered use case testing.

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 →