An independent path is any path through the program that introduces at least one new set of processing statements or a new condition.
Cyclomatic complexity has a foundation in graph theory and is computed in one of three ways:
- Cyclomatic complexity, V (G), for a flowgraph G, is defined asV(G)=E-N+2,whereE=Number of flowgraph edges
N=Number of flowgraph nodes.
- Cyclomatic complexity, V (G) for a flowgraph G, is also defined as
V(G)=P+1,whereThe value V (G) provides us with an upper bound for the number of independent paths that comprise the basis set, and by implication, an upper bound on the number of tests that must be designed and executed to guarantee coverage of all program statements.
No comments:
Post a Comment