Tuesday, November 11, 2008

White Box Testing - Part IV

Data Flow Testing

• Data Flow testing targets the lifecycle of a particular piece of data (i.e. a variable) in an application.
• The technique to implement an effective Data Flow testing is to look for patterns of data usage based on which risky areas of the code can be found and more test
cases can be applied.

Let’s see some basics as regards DATA.

# DATA is used in 4 ways
• (D)efined,
• (U)sed in a predicate,
• (U)sed in a calculation, and
• (K)illed.

E.g.
• Usage of a piece of data in a calculation after
it has been killed, show an anomaly in the
code; Therefore a bug.

# Most Failures involve
• Execution of an incorrect definition
• Incorrect assignment or input statement
• Predicate is faulty
• Definition is missing

• Explore the sequences of events related to the data state and the unreasonable things that can happen to data.

• Explore the effect of using the value produced by each and every computation.
• Considerable effort needs to be given to data declaration statements, since most of
the code contains nearly half of the contents as data declaration.

Some examples are given below

• Sum = expression
• Read (var1, var2, var3)
• Write (total1, total2, total3)
• Method call : CompareValue(val1, val2)
• While : while Boolean do statements
• For statement : for (val1 = init to final)
• If then else : If Boolean then S1;

if Boolean then S1 else S2.
• case : Case var1:
Statement 1:
Statement 2:

# Use the techniques given below for an effective data flow test.
• DD -bug
• DK -bug
• DU – normal
• KD – normal
• KK – harmless, but a bug
• KU – bug
• UD – normal
• UK – normal
• UU -normal

where
D - Define / U - Use / K - Kill

No comments:

Post a Comment

Drop in your comments/ feedback

Calorie Calculator

Calculate how much you expend in 1 hour of your favorite exercise. Health Tips.
Powered By Blogger

Followers

Images - Decision tables

Images - Decision tables
Important image details for the Decision tables

Risk Management

Risk Management
Risk Management