Gray-box testing

Gray-box testing is a software testing method in which the tester has partial knowledge of the internal structure of the system under test. It sits between white-box testing, where the tester has broad access to the internals, and black-box testing, where the tester works with no knowledge of them at all. The combination is intended to yield some of the structural insight of white-box testing while keeping the tester’s perspective close to that of a real user.

The knowledge available to a gray-box tester typically includes high-level and detailed documentation such as software architecture, UML models, web service descriptions (WSDL), and state models, without full access to source code. Techniques and tools commonly associated with gray-box testing include exception handling, regression testing, functional testing, and orthogonal array testing.

Gray-box testing is particularly useful for web applications, which span distributed networks and are often delivered as services for which no source code or binaries are available to permit true white-box testing. The same situation arises for systems built on service-oriented architecture, where the tester can observe interfaces and contracts but not the implementations behind them.

See also: exploratory testing, system testing, integration testing.