Skip to content
← Back to glossary

ホワイトボックステストWhite-Box Testing

Learn in the textbookImplementation and Review

DefinitionWhite-box testing (ホワイトボックステスト) is a technique for designing test cases while looking at a program's internal structure (the sequence of instructions and its branches), used mainly in unit testing.

ExplanationTest cases are built according to a coverage criterion (網羅の基準), which says how far the internal paths must be exercised. For example, running every instruction at least once is statement coverage (命令網羅), and taking both the true and the false outcome of every branch at least once is branch coverage (分岐網羅).

AnalogyIt is like holding a map of a maze, picking the forks you want to check and actually walking them to see whether any lead to a dead end or the wrong exit.

Related past-exam questions(13 questions)