STM_Unit 2
STM_Unit 2
UNIT 2
Transaction, Data Flow and Domain Testing
Presented by:
Dr. B.Rajalingam
Associate Professor & HOD
Department of Artificial Intelligence and Data Science( AI&DS)
St. Martin's Engineering College
SOFTWARE TESTING METHODOLOGIES
Prerequisites
Course Objectives
To provide knowledge of the concepts in software testing such as testing process, criteria,
strategies, and methodologies.
To develop skills in software test automation and management using latest tools.
Course Outcomes:
•Design and develop the best test strategies in accordance to the development model.
UNIT - II
• Transaction Flow Testing: transaction flows, transaction flow testing techniques. Dataflow
testing: Basics of dataflow testing, strategies in dataflow testing, application of dataflow
testing. : domains and paths, Nice & ugly domains, domain testing, domains and interfaces
testing, domain and interface testing, domains and testability.
• Paths, Path products and Regular expressions: path products & path expression, reduction procedure, applications,
regular expressions & flow anomaly detection.
• Logic Based Testing: overview, decision tables, path expressions, kv charts, specifications.
UNIT - IV
• State, State Graphs and Transition testing: state graphs, good & bad state graphs, state testing,
• Testability tips.
UNIT - V
• Graph Matrices and Application: Motivational overview, matrix of graph, relations, power of a matrix, node
reduction algorithm, building tools. (Student should be given an exposure to a tool like JMeter or Win-runner).
REFERENCE BOOKS:
• Think of each transaction as represented by a token that passes from one routine to routine as it
progresses through flow.
• Transaction flow graphs are kind of data flow graphs as we look at the various data objects and
the operation performed on them.
• We should note that the decision nodes of transaction flow graph can be complicated in their
own rights.
Complicated systems that process a lot of different, complicated transactions, should have
explicit representations of the transactions flows or the equivalent.
The systems design documentation should contain an overview section, that details the main
transaction flows.
Detailed transaction flows are a mandatory prerequisite to the rational design of a systems
functional test.
• Try to find most tortuous, longest, strongest path from the entry to the exit of
the transaction flow.
• Instrumentation plays a bigger role in transaction flow testing than in unit path testing.
• Path instrumentation confirms that the outcome was achieved by the intended path.
• The information of the path taken for a given transaction must be kept with that transaction and
• It requires talented, matured, and diplomatic designers who are experienced in both system
design and test design.
• Commit to automation of test execution if you want to do transaction flow testing for a system
of any size.
• If the numbers of test cases are limited, you need not worry about test execution automation.
• If the number of test cases run into several hundred, performing transaction flow testing to
achieve (C1 + C2) needs execution automation without which you cannot get it right.
Alternative 1
2. Biosis Parent
Parent
Daughter Tr.
Daughter Tr.
3.Mitosis Parent
Daughter Tr.
Births
• There are three different possible interpretations of the decision symbol or nodes with two or
more out links. It can be a Decision, Biosis or a Mitosis.
1. Decision
• Here the transaction will take one alternative or the other alternative but not both.
2. Biosis
• Here the incoming transaction gives birth to a new transaction, and both transactions that
continue on their separate paths and the parent retains its identity.
3. Mitosis
• Here the parent transaction is destroyed and two new transactions are created.
1. Junction Continue
Path 2
Daughter Tr.
2. Absorption
Predator
Predator
3. Conjugation
Parent Daughter
Parent
• Data flow testing is the name given to a family of test strategies based on selecting
paths through the program's control flow in order to explore sequences of events
• For example, pick enough paths to assure that every data object has been
initialized prior to use or that all defined objects have been used for something.
• It is our belief that, just as one would not feel confident about a program without
executing every statement in it as part of some test, one should not feel confident
about a program without having seen the effect of using the value produced by
• There are two types of data flow machines with different architectures.
data objects.
• The data flow graph is a graph consisting of nodes and directed links.
• We will use a control flow graph to show what happens to data objects of interest
at that moment.
• Our objective is to expose deviations between the data flows we have and the data
flows we want.
• They can be used in two distinct ways: (1) In a Calculation (2) As a part of a
Control Flow Predicate.
• A record written.
• A variable is used for computation (c) when it appears on the right hand side of an
assignment statement.
• For example, ku means that the object is killed and then used, where as dd means
that the object is defined twice without an intervening usage.
• some are bugs, some are suspicious, and some are okay.
• The control flow graph structure is same for every variable: it is the weights that
change.
22/04/2025 STM(Unit 2):-Dr. B.Rajalingam 42
Data Flow Model
• Data flow testing is a family of test strategies based on selecting paths through the
program's control flow in order to explore sequences of events related to the status
• Dataflow Testing focuses on the points at which variables receive values and the
statements having the property that if the first member of the sequence is executed
• Node
• Edge
• Decision Node
• Junction node
1. To indicate a Sequence:
2. To indicate "IF-THEN-ELSE":
To indicate a
"Repeat-
Until" Loop:
2. Loop-Free Path Segment is a path segment for which every node in it is visited at most once.
3. Simple path segment is a path segment in which at most one node is visited twice. A simple
path segment is either loop-free or if there is a loop, only one node is involved.
4. A du path from node i to k is a path segment such that if the last link has a computational use
of X, then the path is simple and definition-clear; if the penultimate (last but one) node is j -
that is, the path is (i,p,q,...,r,s,t,j,k) and link (j,k) has a predicate use - then the path from i to j
is both loop-free and definition-clear.
For variable X.
In image, because variable X are used only on link (1, 3) any test that starts at the entry
satisfies this criterion (for variable X, but not for all variables as required by the
strategy)
22/04/2025 STM(Unit 2):-Dr. B.Rajalingam 60
All Uses Strategy (AU)
• The all uses strategy is that at least one definition clear path from every definition of every
variable to every use of that definition be exercised under some test.
• Just as we reduced our ambitions by stepping down from all paths (P) to branch coverage (C2),
say, we can reduce the number of test cases by asking that the test set should include at least one
path segment from every definition to every use that can be reached by that definition.
3 Nice Domains
4 Ugly Domains
5 Domain Testing
• Cost-effective testing technique that requires fewer resources compared to other testing
techniques.
• A false sense of security, may not identify all issues outside the domain.
• May not catch complex issues that require testing of multiple variables or interactions between
different parts of the system.
• May not be suitable for all types of systems, particularly those that have complex input and
output parameters or that require more advanced testing techniques.
• A routine must classify the input before doing whatever it does and set it moving on the right path.
• "reject" is a special processing case if the input is an invalid input (Example: Value too big).
• Rather than on the calculations, the classification aspect of the routine is focused in domain testing.
• Structural knowledge is not needed for this model. Only a consistent, complete specification of
input values for each case.
• It is assumed that there must be at least one path for each case to process
D1
D2
INPUT CLASSIFY DO CASE 1 OUTPUT
D3
(x,y,z,…) Dn { Outcome }
DO CASE 2
(1, 2, 3, 4, 5,…)
DO CASE 3
DO CASE n
• If the boundary points belong to some other domain, the boundary is said to be
open.
• It doesn't matter even if the solution is not unique because any caller input will produce the
required output.
• If the callers domain is ugly, the problem can become very difficult.
• You should find and evaluate an inverse function for the caller.
• To do this with more than one variable at a time, you won't be able to do it without tools.