Data Flow Testing

  • Provide a brief definition of dataflow testing. Why is this type of testing a useful alternative to other program-based testing techniques like code coverage and mutation testing?

Brenda Gruber
Data flow testing is structural testing technique that uses test coverage criteria in terms of definition use associations in the program. This type of testing is useful over the alternative types of testing, mutation and code coverage, because it "closes the gap between all-edges and all-paths criteria." All-edge criteria requires that every edge of the graph is traversed during the program execution and all-path requires that every complete path is tested. This is problematic because all-edges does not guarantee thorough testing and all-path might be impossible (ie infinite loops).


Data flow testing is a manner of testing in which the test cases are deisgned in terms of the definition-use pairings in the code under test. It is useful because it provides a compromise between the possibly inadequate all-edges coverage and the sometimes impossible all-paths coverage. bps


Data flow testing provides a criteria that falls between the too-weak all-edges and the too strong all-paths criteria. It is focused on the definition-use associations in the program. It requires the traversal of a subpath which starts at the definition and ends at the use.

Matt DeNapoli

  • What is the all-uses dataflow criterion? Are there dataflow criterion that would be considered "stronger" that all-uses? Why are these measures considered to be "stronger"?

Brenda Gruber
The all-uses dataflow criterion is satisified if the set of complete paths includes a definition clear path to each of its uses including both c-uses and p-uses (computation and predicate uses). The oi-all-uses, output influencing, criterion is the only stronger criterion. Oi-all-uses is satisfied if the set of complete paths includes a definition clear path from every definition to each of its uses (c-uses and p-uses). Also, each use is considered tested if it is output-influencing (it directly or indirectly influences the computation of some program output during the program execution).


The all-uses dataflow criterion ensures that, given a set of paths used under the given test cases, there is a definition-clear path from each definition to its uses. The only stronger criterion is the output-influencing-all-uses, which states that, in addition to satisfying all-uses, a path is considered tested only when its output directly or indirectly influences computation. This criterion is stronger because it does not allow for definition-clear paths which do not affect the overall program. bps


The all-uses dataflow criterion of a set of paths occurs when, within that set of paths there is at least one definition clear path from every definition to each of its uses. A stronger criterion is the output influencing all-uses because it requires that the uses influence directly or indirectly the output of the program.

Matt DeNapoli


  • Briefly describe the automated test data generation problem. Why is it hard to automatically generate test cases for programs?

Brenda Gruber
The automate test data generation problem is that the task of the test generator is to generate input that will cause the program's execution to follow the selected path that exercises the test requirement being tested. This is difficult because the test cases must be designed to provide adequate coverage under the selected test criterion. For extremely small programs this is not too bad, but as programs get large there can become numerous possibles paths that need to be traversed depending on the chosen criterion.


The problem of automated test data generation states that given a program, generate some input so that the program follows a specific path and returns the desired output. It is difficult to generate this data automatically because of the complexity of the criterion. In order to fulfill these properties, the test data must be carefully generated, and so far the best way to do that is manually. bps


The automated test data generation problem consists of generating test cases that provide adequate coverage under a selected criterion within an implementation. The difficulty is introduced by the criterion itself and the necessity to provide the aformentioned adequate coverage. In each case of data generation, a certain path has to be followed, and to provide coverage for a criterion, most if not all paths of the program must be traversed, thus introducing a lot of complexity.

Matt DeNapoli

Link to this Page