What is White Box Testing or Glass Box Testing ?
What is White Box Testing or (Glass Box Testing) ?
White Box testing is a test case design method that uses the control structure of the procedural design to derive the test case.The test cases are derived using white box testing .
Characteristics of White Box Testing
- Guarantee that all the independent path with in a module has been checked at least once.
- Check all the logical decisions on their true and false wise.
- Execute all the loops at their boundaries.
- Check all data structures to ensure their validity
In short the white box testing makes a detailed internal check of the program.
- Basis Path Testing
- Control Structure Testing
Basis Path Testing
Basis Path Testing is a white box testing technique.This enables to measure the logical complexity of the procedure to find the execution path.
Cyclomatic Complexity is a software metric to measure the logical complexity of a program.
Cyclomatic Complexity = E – N + 2
Where E is the Number of Edges and N is the Number of Nodes.
The above diagram contains 11 edges and 9 Nodes. So the Cyclomatic complexity is given by
C = E - N + 2
= 11 - 9 + 2
Control Structure Testing
Control structure testing is a group of white box testing methods.
- Branch Testing
- Condition Testing
- Data Flow Testing
- Loop Testing
Branch testing objective is to execute every possible decision branch at least once. The commonly used branching statements are if, for, while, switch.
Data flow testing selects test paths according to the location of definitions and use of variables.
Loop Testing is a white Box Testing focuses only on the validity of loop constructs.There exists loop constructs of the following type.Simple Loops, Nested Loops, Concatenated Loops and Unstructured Loops.