M6-RL-Code Based Testing 2
M6-RL-Code Based Testing 2
Methodologies
BITS Pilani Prashant Joshi
Module 6: Agenda
d v=…
u y=v+1
1 input (x, y)
2 z=x+1; No Dataflow
between 1 to 5 as x
3 v=x+y;
gets modified @4
4 x=0;
5 w=z+x;
• Statement Testing
• Branch Testing
• Multiple Condition Testing
• Loop Testing
• Path Testing
• Modified Path Testing (McCabe Path)
• Dataflow Testing
• Transaction Flow Testing
• Measure
• Understand
• Control
• Improve
20 Software Testing Methodologies
Millers Test Coverage Metrics
Metric Description of Coverage
C0 Every Statement
C1 Every DD-Path (DD-Path = Decision to Decision Path)
C1p Every predicate to each outcome
C2 C1 coverage + loop coverage
Cd C1 coverage + every dependent pair of DD-paths
CMCC Multiple Condition Coverage
Cik Every program path that contains up to k repetitions of a
loop (usually k=2)
Cstat “Statistically significant” fraction of paths
Cinfinity All possible execution paths
1 input(a, n)
2 max=a[1];
3 min=a[1];
4 i=2;
5 while i<n do
6, 7 if max<a[i] then max=a[i]
8, 9 if min>a[i] then min=a[i]
10 i=i+1;
11 output(max, min)