Data Flow Testing - Strategies
Data Flow Testing - Strategies
• Definition:
(ACU + P) is a testing strategy which requires that every
definition of every variable includes at least one path from
that definition to every computational use.
All–c–Uses/Some–p–Uses strategies
(ACU-P cont…): Flow graph annotated for variable
d cY c p
Begin 1 2 3 4 5
c p
Y
Z c
End 10 9 8 7 6
• As seen above, ACU coverage is achieved for Y by the path
(1,2,3,4,7,8,9,10). But several definitions of predicate uses are
not covered – path (4,5,6,7).
• In this testing strategy, every definition of every variable has a
path to every c-use of that definition. If there is no c-use of that
definition, the p-use of the definition is considered. Hence, the
(ACU+P) coverage of the path for Y should be (1,2,3,4,7,8,9,10).
All – Definitions strategy (AD):
• The AD strategy is weaker than both (ACU+P) and (APU+C)
strategies.
• Definition: AD is a testing strategy that requires every definition
of every variable to cover at least one use of that variable. The
use can be a computational use(c) or a predicate use(p).
• The path (1,2,3,4,5,6,7,8,9,10) satisfies the AD strategy for
variable Y. For the variable Z, any entry or exist
**Refer path satisfies
the earlier slide for fig.
the AD criterion. Therefore, we expect that the AD strategy is
weaker than both the (ACU+P) and (APU+C) strategies.
• Every definition has a path to at least one use of that definition.
All–Predicate–Uses Strategy:
• In this testing strategy, every definition of every
variable has a path to every P-use of that definition.
• If there is no P-use in the definition, then it is dropped
from the contention(argument).
• Definition: APU is a testing strategy derived from the
(APU+C) strategy. But here, we do not include a c-use
for the variable if there are no p-uses for the variable
following each definition.
APU is therefore weaker than (APU+C).
All–Computational Uses Strategies:
• Also referred to as the ACU strategy.
• Definition:
ACU is a testing strategy derived from the
(ACU+P) strategy. But here, we do not include
a p-use for the variable if there are no c-uses
for the variable following each definition.
• It is therefore evident(obvious) that ACU is
weaker than (ACU+P).
Ordering the strategies:
All Paths
This shows the relative
strength of data flow & control
flow testing strategies.
All DU Paths
Test cases are based on the (ACU+P) & (APU+C) are in
Relative strength of parallel & hence
All Uses comparable
testing strategies.
All-C/Some-P All-P/Some-C