2. #
Path testing
A structural test technique
Requires complete knowledge of the
programs structure.
Mostly used by the programmers to unit
test their own code.
3. #
Control flow graph
Control flow graph is a graphical
representation of programs control structure.
It uses elements : process blocks , decisions ,
junctions.
Process block:
Process A
4. #
Control flow graph (contd..)
Process block is a sequence of program
statements uninterrupted by either decisions
or junctions
A process block can be one statement or
hundreds of statements or instructions.
A process has one entry and one exit
A program does not jump into or out of the
process.
5. #
Control flow graph(contd..)
Decision :
A decision is a program point at which the
control flow can diverge
When most decisions are two way some are
three way branches in control flow.
A case statement is a multi way branch or
decision
If
A=B no
yes
6. #
Control flow graph(contd..)
junction :
A junction is a point in the program where the
control flow can merge.
Examples of junction : goto, continue
A case statement is a multi way branch or
decision
1 2
7. #
Flow graph , flow chart
White box testing is the detailed investigation
of internal logic and structure of the code
White box testing is also called glass testing
or open box testing.
8. #
Path testing
A path through a program is a sequence of
instructions or statements that starts at an
entry, junction , decision and ends at another
junction, decision ,exit.
9. #
fundamental path selection
criteria
• Exercise every path from entry to exit
• Exercise every statement or instruction
at least once.
• Exercise every branch and case
statement in each direction at least
once
10. #
• Path testing : execute all possible control flow
paths through the program. This is restricted
to all all possible entry/exit paths through the
program.
100% path coverage
Statement testing
Execute all statements in the program at least
once under some test
100% statement coverage
Branch testing
100% branch coverage