People often talk of White Box and Black Box testing. These might be defined as:
- Black Box: You only use the PublicInterface, and make no assumptions about the inner implementation
- White Box: You mess with the innards and test at any and every point in the implementation
A
GrayBoxTest recognizes then the situation is not black and white. There are 2 interpretations of this middle ground:
- You use only the public interface, but you analyze the code to target any boundaries (or whatever) that are artifacts of the implementation, but which are not implied by the specification.
- Stimulation can only use the public interface, but you may use internal queries to check the results (I.e. look but don't touch when you open the hood).
These may also be referred to as Dark Gray and Light Gray testing approaches.
--DaveWhipp.