White Box Testing

  • by

White box testing is a method of testing which is used to measuring the thoroughness of testing through the coverage of a set of structural elements or coverage items. It should require complete knowledge of internal structure of software program or source code.

In white box testing testers should know or access to the source code and can examine it. It deals with source code, code structure, code coverage and internal design and how they are coded and execute.
White box testing can be applied to unit testing, integration testing and system testing.

White box testing tests are logic driven because know internal structure of product, statement coverage, branches, paths and conditions.
It is used to find the number of test cases required to assurance of test coverage.

White box testing also called as structural testing or clear box testing or glass box testing or transparent testing because all the internal coding is clearly seen and tested.

White box testing covers
– Possible paths, conditions and coverage
– Covers logical analysis or internal structure
– Syntax and other types of error

Example -:
A tester, have detailed knowledge of the internal structures of a calculator, tests the all functionality like addition, subtraction, multiplication and division etc.; by providing inputs and verifying the outputs against the expected outcome. Test all conditions, branches and paths to perform calculator functions.

Advantages of white box testing -:
1. To check and verify internal security
2. To test each functionality on individual basis
3. Used to optimize code
4. Easy to automate
5. Identify hidden errors

Disadvantages of white box testing -:
1. Technical and skilled resources are required
2. Expensive and time consuming
3. Chances of missing some paths

Methods of white box testing -:
A] Statement coverage
B] Path testing
C] Decision coverage
D] Condition coverage
E] Data flow testing

Leave a Reply