DATA FLOW TESTING
Data ﬂow testing can be considered to be a form of structural testing: in contrast to functional testing, where the program can be tested without any knowledge of its internal structures.Structural testing techniques require the tester to have access to details of the program’s structure. Data ﬂow testing focuses on the variables used within a program. Variables are deﬁned andused at different points within the program; data ﬂow testing allows the testerto chart the changing values of variables within the program. It does this byutilizing the concept of a program graph: in this respect, it is closely related topath testing, however the paths are selected on variables. Various definitions related to data flow testing are:
· Defining Node: Node n € G(P) is a defining node of the variable v € V, written as DEF (v, n), if the value of the variable v is defined at the statement fragment corresponding to node n.
· Usage Node: Node n € G(P) is a usage node of the variable v € V, written as USE (v, n), if the value of the variable v is used at statement fragment corresponding to node n. A usage node USE (v, n) is a predicate use (denoted as p) if statement n is a predicate statement otherwise USE (v, n) is a computation use (denoted as c).
· Definition use: A definition use path with respect to a variable v (denoted du-path) is a path in PATHS(P) such that, for some v € V, there are define and usage nodes DEF(v, m) and USE(v, n) such that m and n are initial and final nodes of the path.
· Definition clear: A definition clear path with respect to a variable v (denoted dc-path) is a definition use path in PATHS(P) with initial and final nodes DEF (v, m) and USE (v, n), such that no other node in the path is a defining node of v.
Few define/reference anomalies are as follows:
· A variable that is deﬁned but never used (referenced).
· A variable that is used but never deﬁned.
· A variable that is deﬁned twice before it is used.”
The du-paths and dc-paths describe the flow of data across source statements from points at which the values are defined to points at which the values are used. The du-paths that are not definition clear are potential trouble spots. Hence, the objective is to find all du-paths and then identity those du-paths which are not dc-paths. This is known as DU testing Strategy. In this strategy, chance to cover all edges of the flow graph is very high; although it does not guarantee 100% coverage. This is also effective for error detection specifically for DU-paths that are not definition clear paths.
Department of Information Technology