This treats the system as one in which the workings can be seen. The structure of the program is taken into account when tests are designed for the program. This is sometimes called Structural Testing. It should do the following:
- Guarantee that all statements in the program have been tested at least once, ie: identify all pathways through code (eg: sequence, selection and iteration).
- Test all the decision statements on their true and false side and check to see which of these paths have not been tested in the Black Box approach.
- Test all loops at their boundaries and their operational limits.
- Exercise internal data structures to check their validity.
- Create new test data for paths not already tested.
Therefore, White Box Testing involves the programmer looking at every path through the coding. The details of the system are treated like a white box or a glass box through which the code can be seen clearly.