Академический Документы
Профессиональный Документы
Культура Документы
Term:2009-2010
5 Dataflow Madel L5 47
Transaction-flow
Transaction-flow Graph
TFG represents a behavioral (functional) model of the program (system) used for
functional testing by an independent system tester.
Transaction
6. Request direction from user 12. Record transaction in log & cleanup (Closure)
cancel
help
Y
Transmit Accept More
B C Transmit D
Page to Input Fields? To CPU
terminal Field
CPU- Y N N
More User wants Done
D Accept Valid ?
Pages ? Review?
Confirm
Transmit Set up
Diagnostic C Review
to Terminal
ref boris beizer 5
Definitions U2
Uses of Transaction-flow
Loops are less as compared to CFG. Loops are used for user input error processing
Input S A S B S C S S Output
E
S : Scheduler A, B, C, D, E : Processes
ref boris beizer 7
Implementation of Transaction-Flow U2
Input Output
Queue EXECUTIVE Queue
Front Output
End SCHEDULER - AND / OR OPERATING SYSTEM Module
DISPATCHER
Process
Queues A Processor B Processor C Processor D Processor E Processor
Application Processes
A Transaction is created by filling in a Transaction Control Block (TCB) by user inputs and by
placing that token on input Q of Scheduler.
Scheduler examines and places it on appropriate process Q such as A. When A finishes with
the Token, it places the TCB back on the scheduler Q.
3. Scheduler contains no code / data. Processing modules contain code for routing.
• Scheduler invokes processes A to E as well as disk & tape read & writes.
Cyclic structure like in this example is common in process control & communication systems.
• TFG has tokens, & DFG has data objects with history of operations applied on them.
2. Decision nodes of TFG have exception exits to the central recovery process.
Alternative 1
2. Biosis Parent
Parent
Daughter Tr.
Daughter Tr.
3.Mitosis Parent
Daughter Tr.
Mergers of transactions
Path 1
1. Junction Continue
Path 2
Daughter Tr.
2. Absorption
Predator
Predator
3. Conjugation
Parent Daughter
Parent
NOTES:
• Petrinet model uses operations for all the above. But Petrinets are
applied to H/W, N/W protocol testing – but not Software.
6. Approximation to Reality
• Attempt to Structure
• Represent Explicitly
1. Conducting Walkthroughs
• Traceability to Requirements
2. Path Selection
3. Sensitization
• Use patches & break points, mistune, and break the rules,
4. Instrumentation
2. Need
• Trace
• A Running Log
2. Mistakes
6. Test Execution
2. Transaction Dispatcher
• Uses tables & Finite State Machines
4. Self-Test Support
• Privileged modes in Transaction control tables
26 ref boris beizer
Data - Flow Testing - Basics U2
Anomaly
Definition:
Example:
Pick enough paths to assure that every data item has been
initialized prior to its use, or that all objects have been used for
something.
Data - Flow Testing - Basics U2
Motivation
• Abstract M I M D
• Language & compiler take care of parallel
computations
Data - Flow Testing - Basics - Motivation U2
Given m, n, p, q, find e.
e = (m+n+p+q) * (m+n-p-q)
a = n+m
a := m + n
b := p + q b=p+q
c := a + b
d := a - b c=a+b
e := c * d
d=a-b
e=c*d
Assumptions
Convert to a CFG
Used - (u)
• In a calculation - (c)
ku : a bug
ud : normal. Redefinition.
uk : normal
uu : normal
Data - Flow Testing - Basics - Motivation U2
-d normal
-u anomaly
-k anomaly
k- normal
d- possibly anomalous
Data - Flow Testing - Basics U2
• K, D, U, A
• Processing Step
• k, d, u
Data - Flow Testing - Basics U2
• Object state
• Unforgiving Data flow state graph
Undefined
K
k, u
d
u
d, k
U D A Anomalous
u
d
Defined d, k, u
Used
Data - Flow Testing - Basics U2
d DK
k
d
u k
U D d
u
d
DD
u
d
Data - Flow Testing - Basics U2
• Dynamic analysis
Intermediate data values
Data - Flow Testing - Basics U2
Procedure to Build:
2. Predicated nodes
3. Sequence of links
1. Join
2. Concatenate weights
3. The converse
Data - Flow Testing - Basics : Data Flow Model U2
Example: an – 1
Z = b + ---------
START a - 1
INPUT a, b, n
Z := 0
IF a = 1 THEN Z := 1
GOTO DONE1
r := 1 c := 1
POWER:
c := c * a
r := r + 1
IF r <= n THEN GO TO POWER
Z := (c – 1) / (a – 1)
DONE1:
Z := b + Z
END
Data - Flow Testing - Basics – Data Flow model U2
Read a,b,n
Z := 0 Z := 1 Z := b + Z
1 2 5 6
a = 1?
P1
Y
Z := (c-1)/(a-1)
P2
3 4 r<n?
r := 1 c:=1 r := r+1, c:= c*a
Y
Data - Flow Testing - Basics – Data Flow model U2
d or kd cd or ckd
d
1 2 5 6
a = 1?
P1
Y
d or kd
P2
3 4 r<n?
Y
Data - Flow Testing - Basics – Data Flow model U2
1 2 5 6
a = 1?
P1
Y
-d c-
ckd or kd P2
3 4 r<n?
Y
Data - Flow Testing - Basics – Data Flow model U2
1 2 5 6
a = 1?
P1
Y
-d p-
ckd or kd P2
3 4 r<n?
Y
Data - Flow Testing - Basics – Data Flow model U2
d c
1 2 5 6
a = 1?
P1
Y
P2
3 4 r<n?
Y
Data - Flow Testing - Basics – Data Flow model U2
d
1 2 5 6
a = 1?
P1
Y
p-
P2
3 4 r<n?
Y
Data - Flow Testing - Basics – Data Flow model U2
d
1 2 5 6
a = 1?
P1
p
c-
c P2
3 4 r<n?
Y
Data - Flow Testing - Basics – Data Flow model U2
DEFINITIONS
DFT Strategies
Purpose:
• APU + c
• Stronger than P2
• ACU + p
• Weaker than P2
Data - Flow Testing – Data Flow Testing Strategies U2
• ACU :
All Paths
All du Paths
All Defs AD
All c uses (ACU) All P-uses APU
All Branches P2
All Stmts P1
Data - Flow Testing – Data Flow Testing Strategies U2
Slicing:
Stmt1 var v
stmt2
Stmt3 var v
Stmt4 var v
Stmt s var v
Data - Flow Testing – Data Flow Testing Strategies U2
Dicing:
Debugging:
• Select a slice.
• Narrow it to a dice.
Dynamic Slicing:
Application of DFT
Application of DFT
Application of DFT
ADUP ~ ½ APU*
AP ~ AC
Data - Flow Testing - – Data Flow Testing Strategies U2
Application of DFT
DFT vs P1, P2
• DFT is Effective
DFT - TOOLS
• Cost-effective development
• Commercial tools :
• Efficient Testing
U2
Data - Flow Testing – Questions from the previous year’s exams
1. How is data flow testing (DFT) helpful in fulfilling gaps in path testing?