Topics Covered: Lesson 25
Topics Covered: Lesson 25
LESSON 25:
so make design errors. White box testing can find these introduces at least one new set of processing statements or a
errors. new condition (i.e., a new edge)
• Typographical errors are random. Just as likely to be on an
obscure logical path as on a mainstream path.
“Bugs lurk in corners and congregate at boundaries”
Basis Path Testing
A testing mechanism proposed by McCabe.
Aim is to derive a logical complexity measure of a procedural
design and use this as a guide for defining a basic set of
execution paths.
Test cases, which exercise basic set, will execute every statement
at least once.
Flow Graph Notation
Flow graph notation helps to represent various control
structures of any programming language. Various notations for
representing control flow are:
Cyclomatic Complexity 4. Prepare test cases that will force execution of each path in
The cyclomatic complexity gives a quantitative measure of the the basis set.
logical complexity. This value gives the number of independent Note: some paths may only be able to be executed as part of
paths in the basis set, and an upper bound for the number of another test.
tests to ensure that each statement is executed at least once.