next up previous
Next: Backward and Forward Up: Regression Test Previous: Regression Test

Data Flow Type Regression Testing

The overall goal of testing is to provide confidence in the correctness of a program. With testing, the only way to guarantee a program's correctness is to verify it on all possible inputs, which is clearly impossible. Thus, systematic testing techniques generate a representative set of test to provide coverage of the program according to some criteria. A given set of tests is adequate for a program with respect to a particular criterion if it covers the program according to that criterion. Data flow testing offers a family of adequacy criteria for testing programs, including all-definition and all-uses.

In data flow testing, a variable assignment in a program is tested by generating test that execute subpath from assignment (definition) to points where the variable's value is used (use). Uses in the program are either computation uses (c-uses) or predicate uses (p-uses). A c-uses occurs whenever a variable is used in a computation or output statement; a p-use occurs whenever a variable is used in a predicate statement. Traditional data flow analysis techniques uses control flow graph representation of a program. In control flow graph, each node corresponds to statements that are executed sequentially and each edge represent the flow of the control between statements. Definitions and uses of variable are attached to nodes in a control flow graph, and data flow analysis uses these definitions and uses to compute def-use associations.

 
Figure 1: An example of Code segment and it's control flow graph

Def-use associations are represented by triples , where the value of variable v defined in statement s is used in statement or edge u. In figure 1,an example code segment and it's control flow graph is given and definition are shown with the variables on the left side of the assignment and uses are shown with the variable on the left side of the assignment and uses are shown with variable on the right side of an assignment or in a predicate. Test data adequacy criteria are used to select particular def-use associations to test. One criterion, all-du paths, require that each definition of a variable be tested on each loop-free subpath to each reachable use. Another criterion, all-use, require that each definition of a variable be tested on some subpath to each of it's uses. To identifying def-use association that may be affected by a program change, the control dependency information are used. Informally, a node (statement) in a control flow graph is control dependent on another node (statement) Y if there are two paths out of Y, such that path necessarily reaches X and the other path may not reach X. In order to find the definition-use pair, backward and forward type algorithm can be used. First one tries to look at the definition use pair before the current code line, other looks after the that code line.



next up previous
Next: Backward and Forward Up: Regression Test Previous: Regression Test



Generated by latex2html-95.1
Fri Jul 12 14:53:37 EDT 1996