Strategies
in Data Flow Testing
Data Flow testing strategies are
structural strategies
In contrast to the path testing
strategies, data flow strategies take in to account, what happens to data
objects on the links in addition to the raw connectivity of the graph
In other words, data flow strategies
requires data flow link weights (d,k, du, dk)
A strategy X is stronger than another strategy Y, if all test cases
produced under Y are included in those produced under X - conversely for weaker
Terminology
Clear Path Segment:
Clear Path Segment with respect to
variable X, is a connected sequence of links such that X is (possibly defined
on the first link and not redefined or killed on any subsequent link of that
path segment
All paths in image (a) are definition clear because variables X and Y
are defined only on the first link (1, 3) and not thereafter
Image (b)shows more complicated
situation. The following path segments are definition-clear:
(1, 3, 4), (1, 3, 5), (5, 6, 7, 4), (7,
8, 9, 6, 7), (7, 8, 9, 10),(7, 8,10) (7, 8, 10, 11)
Sub graph (1, 3, 4, 5) is not
definition-clear because the variable is defined on (1, 3) and again on (4, 5)
For practice, try finding all the definition-clear subparts for this
routine (i.e. for all variables)
Loop-Free Path
Segment:
It is a path segment for which every
node in it is visited at most once
Example: Path (45678, 10) in image (b) is loop free, but path (10, 11, 4, 5, 6,
7, 8, 10, 11, and 12) is not because nodes 10 and 11 are each visited twice
Simple Path Segment:
It is a path segment in which at most
one node is visited twice
Example: In image (b), (7, 4, 5, 6 and 7)
is a simple path segment. a simple path segment is either loop-free or if there
is a loop, only one node is involved
A du Path:
From node i to k is a path segment such
that if the last link has a computational use of X, then the path is simple and
definition-clear; if the penultimate (last but one) node is j- that is, the
path is (i, p, q,..... r, s, t, j and k) and link (j, k) has a predicate
use-then the path form i to j is both loop-free and definition-clear
Post a Comment
Post a Comment