Explain like I'm five · SW Eng

What are Specification-Based Test Design Techniques?

Specification-based test design, told as a story about testing with a handful of representative cases picked from the rulebook, without reading the whole manuscript.

just one age field has far too many possible caseschecking every single one would take a lifetime

Checking every single case would take a lifetime.Just one age field has far too many possible values.

the age field — how many values could go in?-1, 0, 1, 2 ... 17, 18, 19 ... 199, 200 ...trying every single value just isn't possible

The number of values an age field could take is practically infinite.Trying every single value just isn't possible.

spec-based test design = picking representative cases from the rulebook aloneTHE WRITING RULESage: 0 to 150name: 1 to 20 charactersgrade: one of A/B/Cwithout reading the whole manuscript, test with just a few cases picked from the rules

Spec-based test design picks representative cases from the rulebook alone.Without reading the whole manuscript, you test with just a few cases picked from the rules.

Equivalence partitioninggroup similar inputs and test just one
Boundary value analysischeck just above and below the allowed range's edge
Decision table testingtest rule combinations laid out in a table
State transition testingtest every time the story moves to a new stage
TEST CASES FOR THE AGE FIELD (0–150)partition: normal (50), out of range (-1), out of range (200)boundary: 0, -1, 150, 151 — just either side of the linenot every single age gets triedthese few cases check the age rule's range and edges

A handful of representative cases checks the rule's range and edges.One normal case, two out-of-range cases, and the values just either side of the boundary — that's often enough.

faster than testing everything, with just a few casesrare combinations the rules never mention can slip throughthe rulebook alone doesn't catch every error

The rulebook alone doesn't catch every error.Rare combinations the rules never anticipated still need other methods, like exploratory testing, alongside this.

In one breath

Specification-based test design = instead of reading the whole manuscript, picking a small set of representative cases straight from the written rules.

Specification-based (black-box) test design creates test cases from the requirements spec alone, without looking at the internal code. The main techniques are equivalence partitioning (testing one representative from each group of similar inputs), boundary value analysis (testing just either side of a boundary), decision table testing (laying out condition combinations in a table), and state transition testing (testing at each change of state).

When grown-ups say it

Specification-Based Testing
Testing based on the rulebook alone. Can be done without looking at the code — black-box.
Equivalence Partitioning
Grouping similar inputs together. Each group is assumed to behave alike, so one test stands for it.
Boundary Value Analysis
Checking just either side of the line. Mistakes often show up right at the boundary.
Decision Table Testing
Laying out condition combinations as a table. Keeps you from missing a combination when several conditions interact.
State Transition Testing
Testing every time the story moves to a new stage. Used for flows like booked → confirmed → canceled.
Black-Box Testing
Checking from the outside without seeing the inside. All spec-based techniques fall in this category.
Test Case
Each representative case that gets picked. Written as a pair: the input and the expected result.
Exploratory Testing
A person poking at what the rulebook never anticipated. Fills the gap for rare combinations spec-based techniques miss.
Next story
The Writer and the Printer, With No Wall Between Them →
Want another term as a picture book? Request →