Data flow tested is used to find issues such as:
- a variable that is used but never declared
- a variable that is declared but never used
- a variable being de allocated prior to its use
- a variable that is defined multiple times before being used
Some advantages of using data flow testing to find issues in a program include, but are not limited to, finding variables that are used but not defined ever, and finding a variable that has been defined numerous times before it is even used.
Data flow coverage can be classified into the following categories based on “sub-paths” and “complete path”:
- All definition coverage: Covers “sub-paths” from each definition to some of their respective use.
- All definition-C use coverage:“sub-paths” from each definition to all their respective C use.
- All definition-P use coverage: “sub-paths” from each definition to all their respective P use.
- All use coverage: Coverage of “sub-paths” from each definition to every respective use irrespective of types.
- All definition use coverage: Coverage of “simple sub-paths” from each definition to every respective use.