Professional Documents
Culture Documents
Software Testing & Techniques
Software Testing & Techniques
Software Testing
From the above table, If we buy 5 units, we pay 5*5 = $25. If we buy 11 units,
we pay 5*10 = $50 for the first ten units and $4.75 for the eleventh item.
Similarly, if we buy 15 units, we will pay 10*5 + 5*4.75 = $73.75.
1 – 100
1 – 20 21 – 40 41 – 60 61 – 80 81 - 100
A life insurance company has base premium of $0.50 for all ages.
Based on the age group, an additional monthly premium has to be paid that is as
listed in the table below.
For example, a person aged 34, has to pay a premium=base premium +
additional premium=$0.50 + $1.65=$2.15.
Path 1: 1-11
Path 2: 1-2-3-4-5-10-1-11
Path 3: 1-2-3-6-8-9-1-11
Path 4: 1-2-3-6-7-9-1-11
Path 5: 1-2-3-4-5-10-1-2-3-6-8-9-1-11
Predicate Nodes:
V(G) = Predicate Nodes + 1
V(G) = 3 + 1
V(G) = 4
Predicate Nodes:
V(G) = Predicate Nodes + 1
V(G) = 5 + 1
V(G) = 6
1-2-10-11-13
PATH – 2 :
1-2-10-12-13
PATH – 3 :
1-2-3-10-11-13
PATH – 4 :
1-2-3-4-5-8-9-2-….
PATH – 5 :
1-2-3-4-5-6-8-9-2-….
PATH – 6 :
Prakash.J
1-2-3-4-5-6-7-8-9-2-….
PSG College of Technology
STEP - 4
1-2-10-11-13
PATH – 2 :
1-2-10-12-13
PATH – 3 :
1-2-3-10-11-13
PATH – 4 :
1-2-3-4-5-8-9-2-….
PATH – 5 :
1-2-3-4-5-6-8-9-2-….
PATH – 6 :
Prakash.J
1-2-3-4-5-6-7-8-9-2-….
PSG College of Technology
Prakash.J PSG College of Technology
INPUT EXPECTED OUTPUT PASS / FAIL
Test Case – 1
Path – 1
Sum = 45 , Total valid = 10 Average = 4.5 Pass
Value [1] = - 999
Test Case – 2
Path – 2
Sum = 100 , Total valid = 0 Average = - 999 Pass
Value [1] = - 999
Test Case – 3
Path – 3
Min = 1, Max = 11, Average = 0.9 Pass
Total.input = 101
Value[1, 2, 3, …., 101]
Sum = 100
Prakash.J PSG College of Technology
INPUT EXPECTED OUTPUT PASS / FAIL
Test Case – 4
Path – 4
Min = 1, Max = 10, Average = - 999 Pass
Value[0, 2, 3, …., 10]
Test Case – 6
Path – 6
Min = 1, Max = 11, Average = 4.5 Pass
Value[1, 2, 3, …., 10]