Data Flow Testing learning notes

What is Data Flow Testing

Data Flow Testing is a way to test a program. For a variable x, where we define variable x, called ld; where we use variable x, called lu. If there exists at least one path from ld to lu with no intermediate redefinitions, we call the ld and lu is a def-use pair. Data Flow Testing find approaches to coverage def-use pair as much as possible.

Precess

There are three process to complete a Data Flow Testing:
1. Data-flow Analysis
2. Test Data Generation
3. Coverage Tracking

Approaches to test data generation

1. Random Testing
Choose test inputs in random ways.

2. Collateral Coverage-based Approach
Use the coverage of low level program entities (e.g.,statements or branches) to infer the coverage of high level entities (e.g., def-use pairs).Also could identify a minimal set of def-use pairs such that the paths covering these pairs could cover all the pairs in the program.

3. Search-based Testing
The problem of test data can be interpreted as a search problem in which it searches for desired values from program input domains to fulfill test requirements.

4. Symbolic Execution
Use symbolic values instead of concrete values as program input.There two type of Symbolic Execution: Static Symbolic Execution and Dynamic Symbolic Execution.Static Symbolic.Static Symbolic Execution is based on control flow graph (CFG), while the Dynamic Symbolic is based on execution path.

5. Model Checking
A model checker will search the entire state space of the system and check whether the property is violated or not.