Page 206 - DCAP405_SOFTWARE_ENGINEERING
P. 206
Unit 12: Testing Tactics
Notes
Notes Each node that contains a condition is called a predicate node and is characterized
by two or more edges emanating from it.
Cyclomatic Complexity/Independent Program Path
Cyclomatic complexity is software metric that provides a quantitative measure of the logical
complexity of a program. When used in the context of the basis path testing method, the value
computed for cyclomatic complexity defines the number of independent paths in the basis set of
a program and provides us with an upper bound for the number of tests that must be conducted
to ensure that all statements have been executed at least once.
An independent path is any path through the program that introduces at least one new set of
processing statements or a new condition. When stated in terms of a flow graph, an independent
path must move along at least one edge that has not been traversed before the path is defined.
Figure 12.2 (A)
LOVELY PROFESSIONAL UNIVERSITY 199