White box testing assumes that the testers involved can look at the application code. In this type of testing, testers can look for potential failure scenarios in the code itself and ensure each class is behaving the way it’s supposed to. All internal components are exercised and tests are conducted to ensure that operations perform according to specifications. Sometimes this type of testing is referred to as unit testing.
Test plans or test cases for white box testing can only be done after a stable version of the application, or application block is available. Testers will perform code reviews in order to profile code coverage, resource utilization or leaks. Internal subroutines are identified and tested for integrity and consistency.
Strategies for white box testing include segment coverage to ensure each statement is run at least once, condition coverage to test each multiple-path combination, data flow testing to track variables throughout calculations, and much more. White box testing ensures that all independent paths are exercised, all logical decisions are verified, and all loops are executed at their boundaries.
The most common kinds of defects found in white box testing are logical errors, design errors, and incorrect syntax.