WIPIVERSE All articles

White box (software engineering)

A white box (also called a glass box, clear box, or open box) is a subsystem whose internals can be viewed but usually not altered. The term is used in systems engineering, software engineering, and intelligent user interface design, where it is closely related to explainable artificial intelligence.

In software engineering, the concept stands in contrast to a black box, whose internal workings are hidden. A white box allows a developer or tester to inspect the internal structure, logic, code, and data flows of a system or component.

Characteristics

  • Visibility: The internal structure of the subsystem is accessible for inspection (e.g., source code, algorithms, control flow, data flow).
  • Modification: Internals can typically be viewed but are not usually altered during testing or normal operation.
  • Trade-offs: Having access to subsystem internals makes the system easier to understand and debug but also easier to exploit or hack (e.g., weaknesses in an algorithm become much easier to discover).

White-Box Testing

The most common application of the white-box concept in software engineering is white-box testing (also known as clear-box testing, glass-box testing, structural testing, or code-based testing). This testing technique:

  • Tests internal structures and workings of an application, as opposed to its functionality (which is the domain of black-box testing).
  • Derives test cases from analysis of source code, control flows, and data flows.
  • Assumes the tester has full access to implementation details.
  • Is generally more effective than black-box testing at finding hidden defects, but requires greater sophistication from the tester.

Historical Context

The notion of a "Black Box in a Glass Box" was originally used as a metaphor by du Boulay, O'Shea, and Monk (1981) for teaching complex computing concepts to novices. This metaphor has since been extended to user interface design, adaptive hypermedia, and explainable AI systems.

Related Concepts

  • Black box – the opposing concept where internals are hidden
  • Gray-box testing – a hybrid approach combining limited access to internals
  • White-box cryptography – cryptographic implementations designed to resist key extraction even when an attacker has full access to the implementation
Browse

More topics to explore

    Browse all articles