31-01-2013, 11:00 AM
White Box Testing
White Box.ppt (Size: 549 KB / Downloads: 34)
What is White-box Testing?
Looking at the internal structure of a program and deriving test cases based on the logic or control flow.
Test cases can be designed to reach every branch in the code and to exercise each condition
Typically done during unit testing
Also known as:
Structural Testing
Glass-Box Testing
What is Black-box Testing?
Looking at the program from an external point of view and deriving test cases based on the specification.
The only criteria upon which the program is judged is if it produces the correct output for a given input.
McCabe’s Cyclomatic Complexity
Software metric
Developed by Tom McCabe (circa 1976)
Directly measures the number of linearly independent paths through a program’s source code, taking into account the various decision points
Independent of implementation language
Complexity Caveats
As code is broken into smaller modules to decrease cyclomatic complexity, structural complexity increases
Some modules may have high complexity but are very easy to comprehend and easy to test
High complexity numbers are only an indicator of something to investigate