Control Flow Testing: Dept. of Computer Science Faculty of Science and Technology
Control Flow Testing: Dept. of Computer Science Faculty of Science and Technology
Control Flow Testing: Dept. of Computer Science Faculty of Science and Technology
• Program path
A program path is a sequence of statements from entry to
exit.
There can be a large number of paths in a program.
There is a (input, expected output) pair for each path.
Executing a path requires invoking the program unit with the
right test input.
Paths are chosen by using the concepts of path selection
criteria.
Basic Idea of Control Flow Testing
• There are many paths between the entry and exit points
of a typical routine.
• Even a small routine can have a large number of paths.
Path Selection Criteria
Input Path
<No, No, No> 1-2-3(F)-8-9(F)-14-15(F)-19-21
<Yes, No, No> 1-2-3(T)-4(F)-6-8-9(F)-14-15(F)-19-21
<Yes, Yes, Yes> 1-2-3(T)-4(F)-6-8-9(T)-10(T)-11-13(F)-14- 15(T)
-16(T)-18-20-21
SCPath1 1-2-3(F)-10(F)-11-13
SCPath2 1-2-3(T)-4(T)-5-6(T)-7(T)-8-9-3(F)-10(T)-12-13
BCPath 1 1-2-3(F)-10(F)-11-13
BCPath 2 1-2-3(T)-4(T)-5-6(T)-7(T)-8-9-3(F)-10(T)-12-13
BCPath 3 1-2-3(T)-4(F)-10(F)-11-13
BCPath 4 1-2-3(T)-4(T)-5-6(F)-9-3(F)-10(F)-11-13
BCPath 5 1-2-3(T)-4(T)-5-6(T)-7(F)-9-3(F)-10(F)-11-13