White Box Testing

White Box Testing are tests that are run an application with the knowledge of the internal working of the code base. White box testing is used in three of the six basic types of testing: unit, integration, and regression testing. Unit testing is done on a small piece, or unit, of code. This unit is usually a class. When a unit is integrated into the main code base, it is more difficult to find a bug in that unit. Integration testing looks at how all components of an application interact. White box integration tests specifically look at the interfaces between the components. Regression testing verifies that modifications to the system have not damaged the whole of the system. Unit tests and integration tests can be rerun in regression testing to verify that modifications to the application work properly.

White box test cases should test different paths, decision points (both true and false decisions), execute loops, and check internal data structures of the application. Basis path testing, equivalence partitioning, and boundary value analysis are all used to create white box tests. Basis path testing looks at the decision points in the application. Equivalence partitioning divides the set of possible input values into equivalence classes. Only a value from each of the equivalence classes needs to be tested. Boundary value analysis looks at testing around a set boundary. A test case should be made for the boundary value, n, n-1, and n+1.

The goal of white box testing is to cover testing as many of the statements, decision point, and branches in the code base as possible.

Author: Laurie Williams and Sarah Heckman
Maintained By: Sarah Heckman
Last Updated: 2008-08-25