White box testing is where you test a software, while taking its design, code, and internal structure into consideration. In other words, you will be verifying the input, flow of data, and the output to verify that the system is working correctly. The main objective of white box testing is to improve usability, security, and design of software. As a tester, you will be aware of the code.
There are numerous reasons available for you to go ahead with white box testing. For example, if you want to discover internal security holes, poorly structured paths, or to understand the behavior of specific inputs that you pass through code, you should do white box testing.
White box testing is quite complicated when compared to black box testing. You should initially understand the source code. This is the main reason on why not every tester can proceed with white box testing. You should have the understanding of a programmer to proceed with testing. Then you should create the test cases and execute them.
There are multiple techniques to follow as you do white box testing. For example, you should do statement coverage, where you test each and every statement within code. Then you get into branch coverage, where you check all possible paths in the code.
There are few types of testing that you perform in white box testing as well. Unit testing holds a prominent place out of them. This is where you test each block of code or unit in order to verify its intended functionality. In agile software development environments, you also test for memory leaks. To improve security of the application, you do penetration testing. On top of that, you even do white box mutation testing, where you try to discover whether best coding practices have been used.
— Slimane Zouggari