Black-box, grey-box and white-box testing

Test types named by how much the testers know at the start: black box (targets only), grey box (partial knowledge) and white box (full knowledge of code and design).

Black-box, grey-box and white-box testing are commonly described by how much the testers are told before they begin. In a black-box test they receive the targets and little else, and must discover the environment themselves. In a grey-box test they receive partial knowledge, such as a user account or network diagrams. In a white-box test they receive full knowledge, such as source code, configuration and architecture. The same scale applies to penetration testing and to application testing.

The common misconception is that black box is the most thorough option because it is the most realistic. It spends much of a time-boxed engagement on discovery an insider already has, so it can leave less time for depth. White box tends to find more for the same effort, and grey box is often chosen to model an attacker who already holds a foothold. The knowledge level is also a separate axis from whether the defenders are told, which is the difference between blind and double-blind testing.

Exam relevance: a scenario is likely to describe what the testers were given (source code, a user account or only an address range), and candidates are expected to name the level from that. Questions in this area also tend to turn on realism against coverage, not on which level is best.