Explain like I'm five · SW Eng

What is White-box/Black-box Testing?

White-box and black-box testing, told through whether the proofreader opens up the manuscript's inner flow, or just reads the finished book like a reader.

the manuscript looked fine on the surface, so the proofreader passed itan error hidden somewhere inside the manuscript went unseen

The manuscript looked fine on the surface, so the proofreader passed it.An error hidden somewhere inside the manuscript went unseen.

you have to look inside at the whole flowjust read it like a reader wouldinsisting on one way misses errors only the other way can see

Opinions split on checking the manuscript's inside or the finished book from outside.Insisting on one way misses errors only the other way can see.

looking insideonly from outsidewhite-box = proofing by the manuscript's inner flow, black-box = proofing the finished book from the outsideboth are done by the proofreader — just from different vantage points

White-box opens the manuscript to see its inner flow; black-box just reads the finished book from outside.Both are done by the proofreader — just from different vantage points.

Follow the inner flowchecking every fork in the path
Check boundary valueswatching a range's first and last values closely
Watch only input/outputwithout peeking inside
Group similar caseschecking one representative case
WHITE-BOX VS BLACK-BOXwhite-box — checks the inner flowblack-box — checks only input and outputboundary values — extra care at a range's two endsequivalence partitioning — test one per groupneither way alone is perfect — using both closes more gapsthe smaller the book, the easier it is to do both

White-box checks the inner flow; black-box checks input and output.Neither way alone is perfect — using both closes more gaps.

using both tests catches a lot of errorsbut testing still can't check every single casetesting isn't proof there are no bugs — only proof the bugs it found are real

Testing isn't proof there are no bugs.Testing only proves that the bugs it found are real.

In one breath

White-box/black-box testing = whether you check by looking at the manuscript's inner flow, or only at the finished book from outside.

White-box testing verifies code by knowing its internal structure (branches, loops) and tracing those paths, while black-box testing verifies functionality using only input and output, without knowing the internals. Boundary value analysis and equivalence partitioning are classic black-box techniques; statement, decision, and condition coverage are classic white-box ones. The pictures use a finished book as the metaphor, but black-box testing also works at the unit level.

When grown-ups say it

White-box Testing
Proofing by looking at the manuscript's inner flow. Traces the code's branches and paths.
Black-box Testing
Proofing only the finished book. Checks using only input and output.
Boundary Value Analysis
Watching the start and end points closely. Errors often show up right at the edge.
Equivalence Partitioning
Grouping similar cases and checking one. Because you can't check every single case.
Unit/Integration/System Testing
Checks scoped from one chapter up to the whole book. The wider the scope, the later it happens.
Requirements Engineering
Deciding beforehand what counts as correct. The test's own standard ultimately comes from the spec. → the one who asks before writing
Regression Testing
Rechecking the old parts after a fix. A fix can break something else.
Coverage
The share of the manuscript's paths actually walked. Even 100% doesn't mean there are no bugs.
Next story
Tending the Reader Address List →
Want another term as a picture book? Request →