← QA Library
Chapter 3 / 9 · 7 min de lectura

Test design

Techniques for choosing a small set of tests with the best chance of finding defects, from reviews to exploratory charters.

Test design answers one question: out of an infinite number of possible tests, which few are worth running? Good test design finds more defects with fewer tests and makes coverage visible instead of accidental.

Static techniques: before anything runs

TechniqueWhat it looks likeFinds
Informal reviewA colleague reads a requirement or pull requestObvious gaps, unclear wording
WalkthroughThe author guides the team through the materialMisunderstandings, missing scenarios
Technical reviewPeers check against standardsDesign flaws, risky decisions
InspectionFormal process with roles and checklistsDefects in critical documents and code
Static analysisLinters, type checkers, security scannersCode smells, vulnerabilities, typos

Black-box techniques

  • Equivalence partitioning: split inputs into groups that behave the same and test one value from each
  • Boundary value analysis: test values on and next to the edges of each group
  • Decision tables: list every combination of conditions and the expected outcome
  • State transition testing: check valid and invalid moves between states of an object
  • Pairwise testing: cover every pair of parameter values instead of every full combination
  • Use case testing: follow realistic end-to-end scenarios, including alternative and error paths

We walk through all of these with worked examples in Test design techniques in practice.

White-box techniques

White-box techniques measure how much of the code structure tests exercise. Statement coverage checks that every line ran at least once; branch coverage checks that every decision went both ways (if true and false). Coverage is a useful signal of untested code, but high coverage doesn't guarantee good tests: a test can run a line without checking its result.

function shippingCost(total, isPremium) {
  if (total >= 50) return 0;      // branch A: true / false
  if (isPremium) return 0;        // branch B: true / false
  return 6;
}
// 100% branch coverage needs 3 tests:
// (60, false) -> 0   (20, true) -> 0   (20, false) -> 6

Experience-based techniques

  • Error guessing: using knowledge of typical mistakes — empty values, special characters, double submissions, time zones
  • Checklist-based testing: a short list of high-level conditions to verify, reused across releases
  • Exploratory testing: time-boxed sessions with a charter, for example “Explore the profile page with very long names and non-Latin scripts for 30 minutes”, with notes on what was covered and found

Choosing techniques

SituationStart with
Form fields and numeric inputsEquivalence classes + boundaries
Business rules with several conditionsDecision table
Orders, subscriptions, workflowsState transitions
Many configurations or settingsPairwise
New feature, unclear requirementsExploratory session + review
Critical algorithmWhite-box with branch coverage
Write tests from the requirement first, then check coverage. Tests written only to raise a coverage number tend to execute code without verifying anything.