White box testing is a testing technique, that examines the program structure and derives test data from the program logic/code. The other names of glass box testing are clear box testing, open box testing, logic-driven testing or path driven testing or structural testing.
White Box Testing Techniques:
- Statement Coverage - This technique is aimed at exercising all programming statements with minimal tests.
- Branch Coverage - This technique is running a series of tests to ensure that all branches are tested at least once.
- Path Coverage - This technique corresponds to testing all possible paths which means that each statement and branch is covered.
Advantages of White Box Testing:
Forces test developers to reason carefully about implementation. Reveals errors in "hidden" code.
Disadvantages of White Box Testing:
- Expensive as one has to spend both time and money to perform white box testing.
- Every possibility that few lines of code are missed accidentally.
- In-depth knowledge about the programming language is necessary to perform white box testing.