Professional Documents
Culture Documents
A simple notation for the representation of control flow, called a flow graph.
Below are the notations used while constructing a flow graph :
Sequential Statements –
If – Then – Else –
Cyclomatric Complexity
Cyclomatric Complexity is a software metric that provides a quantitative
measure of the logical complexity of a program Complexity is computed in one
of three ways:
V(G) = E-N+2
Cyclomatic Complexity V(G) for a flow graph G is also defined as V(G) = P+1
9
8
10
2. Calculate cyclomatic complexity
An independent path in the control flow graph is the one which
introduces at least one new edge that has not been traversed
before the path is defined.
For the above flow graph we can calculate the independent path
is:
1-2-3-4-9-10
1-2-3-5-6-8-9-10
1-2-3-5-7-8-9-10
Number of Independet Path is : 3
Prepare the test cases that will force execution of each path is
the basis path.
Advantages of basis path testing
Condition Testing
It is a test case design method that exercise the
logical conditions contained in a program module.
Loop Testing