White-box testing techniques are used for testing the module for initial stage testing.Black-box testing is the second stage for testing the software. Though test cases for black box
testing can be designed earlier than for white-box testing, they cannot be executed until the
code is produced and checked using white-box testing techniques. Thus, white-box testing is
not an alternative but an essential stage.
Since white-box testing is complementary to black-box testing, there are categories of bugs
that can be revealed by white-box testing, but not through black-box testing. There may be
portions in the code, which are not checked when executing functional test cases, but these will
be executed and tested by white-box testing.
Errors that come from the design phase will also be reflected in the code and therefore, we must
execute white-box test cases for code verification (unit verification).
We often believe that a logical path is not likely to be executed but, in fact, it may be executed
on a regular basis. White-box testing explores these paths too.
Some typographical errors are not observed and go undetected and are not covered by black-
box testing techniques. White-box testing techniques help detect these errors.