Test Case Design Techniques: Beyond Happy Path Testing
Most developers test the happy path and call it done. Systematic test case design techniques — equivalence partitioning, boundary value analysis, decision tables — ensure you're testing what actually breaks.
On this page
Happy path testing finds almost no bugs. Real bugs live in edge cases, boundaries, and unexpected combinations. Test case design techniques give you a systematic way to find those cases without testing everything exhaustively.
Equivalence Partitioning
Divide inputs into groups (partitions) where every value in the group should produce the same behavior. Test one value from each group.
For a task title field that accepts 1–200 characters:
| Partition | Example Value | Expected |
|---|---|---|
| Empty (invalid) | "" (0 chars) | Error: title required |
| Valid range | "Buy groceries" (14 chars) | Task created |
| Too long (invalid) | 201-character string | Error: title too long |
Three tests instead of testing every possible string length. You're testing that the validation logic works for each category of input.
Boundary Value Analysis
Bugs cluster at boundaries. For the same 1–200 character field:
| Value | Position | Expected |
|---|---|---|
| "" | 0 chars (below min) | Error |
| "A" | 1 char (at min) | Valid |
| "AB" | 2 chars (above min) | Valid |
| 199-char string | 1 below max | Valid |
| 200-char string | at max | Valid |
| 201-char string | above max | Error |
This is six tests, but they test every boundary — where most off-by-one errors live.
Boundary value analysis is the single technique that catches the most bugs relative to test count. Always apply it to numeric inputs, string lengths, and date ranges.
Decision Tables
When multiple conditions combine to produce different outcomes, a decision table maps every combination:
For a discount rule: "Premium users get 20% discount. Orders over $100 get 10% discount. Both discounts stack."
| Premium User | Order > $100 | Discount Applied |
|---|---|---|
| No | No | 0% |
| Yes | No | 20% |
| No | Yes | 10% |
| Yes | Yes | 30% |
Four test cases that cover every combination of two boolean conditions. For 3 conditions, you'd have 8 rows. For 4 conditions, 16.
Decision tables are essential for business rules with multiple inputs. Without them, you'll miss combinations.
State Transition Testing
For systems with states and transitions between them:
A task can be: Active → Completed, or Completed → Reopened, or either → Deleted.
Active ──complete──→ Completed
Active ──delete───→ Deleted
Completed ──reopen──→ Active
Completed ──delete──→ DeletedTest cases:
- Active task → complete → verify state is Completed
- Completed task → reopen → verify state is Active
- Active task → delete → verify task is deleted
- Completed task → delete → verify task is deleted
- Invalid transitions: try to "reopen" an Active task → error
- Invalid transitions: try to "complete" a Deleted task → error
State transition testing catches transition logic bugs that happy path testing completely misses.
Pairwise Testing
When you have many configuration options, testing all combinations is exponential. Pairwise testing (also called all-pairs) tests every pair of parameter values at least once:
For a task that can be: Priority (High/Low) × Category (Work/Personal) × Due Date (Set/Not Set) × Assignee (Self/Team):
That's 2 × 2 × 2 × 2 = 16 combinations. Pairwise reduces this to 6-8 test cases that cover every pair of parameter values. Research shows most bugs are triggered by two-way interactions, not three-way or four-way combinations.
Tools like AllPairs generator calculate the minimal pairwise test set automatically.
Applying These in Practice
You don't need to apply all techniques to every feature. A quick heuristic:
- Text/number inputs: Always apply boundary value analysis (min, max, boundaries)
- Business rules with multiple conditions: Decision table
- Features with explicit states: State transition testing
- Many configuration parameters: Pairwise testing
- Simple boolean flags: Equivalence partitioning (true/false)
For most features, boundary value analysis on inputs + decision table for the primary business rule gives you 80% of the protection with 20% of the effort.
Takeaways
- Equivalence partitioning reduces redundant tests by grouping similar inputs
- Boundary value analysis finds off-by-one errors that basic testing misses — always apply it
- Decision tables systematically cover all combinations of business rule conditions
- State transition testing catches bugs in state machine logic that happy path testing ignores
- Apply the right technique to the right problem — not all techniques to everything
Sudarshan Chaudhari
AI Systems Builder / Product Engineer
Bangkok, Thailand
Solo Android developer with 13+ years in QA, building Android apps, AI automation systems, and developer tools at SudarshanTechLabs.
Related Posts
Building something? Available for Android dev and QA consulting.
Work with meComments — powered by Giscus
