Unit 3: Data Flow Testing Strategies &
Domain Testing
Data Flow Testing Strategies - Domain Testing: Domains and
Paths – Domains and Interface Testing.
1. Data Flow Testing Strategies
Definition
Data Flow Testing is a white-box testing technique that focuses on:
The flow of data (variables) through a program
How variables are defined, used, and deleted
Key Concepts
1. Definition (d)
When a variable is assigned a value
Example:
x = 10
2. Use (u)
When a variable is used in:
o Computation → c-use
o Decision/condition → p-use
3. Kill (k)
When a variable is no longer used or redefined
Types of Data Flow Anomalies
Type Meaning Example
d-u Defined then used (correct) x=5; print(x)
d-d Defined twice without use x=5; x=10
u-d Used before definition (error) print(x); x=5
👉 Focus is to detect improper data usage.
Strategies in Data Flow Testing
1. All-Definitions Strategy
o Ensure every variable definition is tested
2. All-Uses Strategy
o Ensure every use of a variable is tested
3. All DU-Paths Strategy
o Test all paths from definition to use
👉 Most powerful but complex strategy
2. Domain Testing
Definition
Domain Testing checks software behavior for:
input ranges (domains)
Boundary and edge values
What is a Domain?
A domain is the set of all possible input values.
Example:
if (marks >= 50)
Domain 1: marks ≥ 50 (Pass)
Domain 2: marks < 50 (Fail)
3. Domains and Paths
Concept
Each domain corresponds to a specific execution path
Example:
if (x > 0)
Path A
else
Path B
Domain Path
x>0 Path A
x≤0 Path B
👉 Different input domains → Different paths executed
Testing Approach
Select test cases from:
o Each domain
o Boundary values
o Edge cases
4. Domains and Interface Testing
Definition
Interface Testing ensures:
Proper interaction between modules/components
Domains in Interface Testing
Focus on:
o Input values passed between modules
o Output received from other modules
Types of Interface Issues
1. Parameter Mismatch
o Wrong data type or number of parameters
2. Boundary Errors
o Passing values outside allowed domain
3. Data Format Issues
o Incorrect format (e.g., string vs integer)
4. Communication Errors
o Failure in data exchange between modules
Example
Module A sends:
age = -5
Module B expects:
age ≥ 0
👉 Domain violation → error detected
5. Advantages of Data Flow & Domain Testing
Detects logical and data-related errors
Ensures correct variable usage
Improves reliability
Helps in boundary condition testing
Quick Summary
Data Flow Testing → Focus on variable usage (define-use paths)
Strategies → All-definitions, all-uses, DU-paths
Domain Testing → Testing input ranges and boundaries
Domains & Paths → Inputs decide execution paths
Interface Testing → Ensures correct module interaction