White Box and Black Box Testing
Testing takes on fundamentally different forms depending on whether or not we have access to the tested artifact’s internals—most notably its source code. White box testing refers to testing where we do have access to the source code and are able to inspect it, either for verification or inspiration for new tests. Black box testing is the opposite. We only have access to the tested artifact’s external interface, whatever that might be. When doing black box testing, there’s no way to inspect the internal state. Instead, the result of the tests is observed in the artifact’s output or by some other indirect means.
Because of how many companies organize their testing activities, testers tend to work from the black box angle, which means that they have to resort to techniques that don’t assume they know everything about the system they’re testing. Not only has this constraint given rise to various testing methods and techniques, but a black box approach imposes an emotional distance from the target of the test.