White Box Testing
White Box Testing
Software Testing
Consider a program given in Fig.8.20 for the classification of a triangle. Its input is a
triple of positive integers (say a,b,c) from the interval [1,100]. The output may be
[Scalene, Isosceles, Equilateral, Not a triangle].
Draw the flow graph & DD Path graph. Also find the independent paths from the DD
Path graph.
Software Testing
Software Testing
Flow graph of
triangle problem is:
1 TO 9 A Sequential nodes
10 B Decision node
11 C Decision node
19 H Decision node
22 J Decision node
Cont….
Software Testing
DD Path graph
Software Testing
DD Path graph is given in Fig
DD Path graph
Software Testing
Cyclomatic Complexity
There will be five independent paths for the flow graph illustrated in Fig..
Path 1 : acf
Path 2 : abef
Path 3 : adcf
Path 4 : a b e a c f or a b e a b e f
Path 5 : abebef