White box testing involves closely examining the internal logic and structure of code. It focuses on testing individual program paths by exercising conditions, loops, and logical decisions. Test cases are designed to ensure each path is tested at least once to cover all statements. Cyclomatic complexity measures the number of independent paths in a program and provides an upper bound for the number of test cases needed. Flow graphs are used to represent program control flow and determine the cyclomatic complexity and basis path testing set.