Perform white box testing – Cyclomatic complexity, Data flow testing, Control flow testing.
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
• 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.
Control Flow Graph
Example Code Fragment
Cyclomatic Complexity
Directly measures the number of linearly independent paths through a program’s source code, taking into account the various decision points
Calculating Cyclomatic complexity
1. E-N+2
Where
E – Number of Eges
N – Number of Nodes
2. # regions + 1
123 says
Ӏ am in ffact grateful tο thе holder of this web site
who haѕ shared thіs wonderful article at here.