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 it.An error hidden somewhere inside the manuscript went unseen.
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.
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.
White-box checks the inner flow; black-box checks input and output.Neither way alone is perfect — using both closes more gaps.
Testing isn't proof there are no bugs.Testing only proves that the bugs it found are real.
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.