Shades of Testing

Testing is a monochromatic but varied discipline. Black-, white-, and gray-box testing frequent the vocabulary. Black-box testing aims to test the software based on the exposed functionality and external contract. On the other hand, white-box testing verifies the software with full knowledge of the internals. Somewhere in the middle of the spectrum, gray-box testing has been represented as black-box testing with educated guesswork about the internals or as white box-testing constrained by the portions of the internal knowledge that could be reasonably inferred or expected.

A desire to minimize the coupling between our tests and our code motivates this graduated taxonomy. If we only test what is externally promised by our objects, ...

Get Quality Code: Software Testing Principles, Practices, and Patterns now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.