Skip to content
All posts
February 9, 20264 min read

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.

TestingBest Practices
Share:

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:

PartitionExample ValueExpected
Empty (invalid)"" (0 chars)Error: title required
Valid range"Buy groceries" (14 chars)Task created
Too long (invalid)201-character stringError: 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:

ValuePositionExpected
""0 chars (below min)Error
"A"1 char (at min)Valid
"AB"2 chars (above min)Valid
199-char string1 below maxValid
200-char stringat maxValid
201-char stringabove maxError

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 UserOrder > $100Discount Applied
NoNo0%
YesNo20%
NoYes10%
YesYes30%

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.

code
Active ──complete──→ Completed
Active ──delete───→ Deleted
Completed ──reopen──→ Active
Completed ──delete──→ Deleted

Test cases:

  1. Active task → complete → verify state is Completed
  2. Completed task → reopen → verify state is Active
  3. Active task → delete → verify task is deleted
  4. Completed task → delete → verify task is deleted
  5. Invalid transitions: try to "reopen" an Active task → error
  6. 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
Share:
S

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.

Stay updated

Get new posts on Android, Kotlin, and solo dev straight to your inbox.

Newsletter preferences

Building something? Available for Android dev and QA consulting.

Work with me

Comments — powered by Giscus