Software Quality Engineering
(SEN453)
Dr. Abdul Rehman
Baloch
Assistant Professor,
FEST,
IQRA University, Karachi
Week # 5
Unit 1/2
Software Quality Engineering
2
Recap of 4th week (Unit 1/2)
Introduction to Software Testing & Testing Techniques
Testing Philosophies Overview
Testing Strategies Overview
Test-Driven Development (TDD)
Behavior-Driven Development (BDD)
Model-Based Testing (MBT) Overview
Benefits and Challenges of MBT
This of 5th Week (Unit 2/2)
Software Testing Techniques (Cont..)
Testing using models
Using finite state machine
Control-flow and dataflow-based testing
Domain and combinatorial testing
Week 05 - Software Quality Engineering -
SEN453
Introduction to Software
3
Testing
Overview of the importance of software
testing in ensuring quality, reliability,
and performance.
- Definition of software testing
- The role of testing in the SDLC
- Types of errors and their impact on the
system
Week 05 - Software Quality Engineering - SEN453
Summary
4
Introduction to Software Testing Behavior-Driven Development (BDD)
Testing Techniques Overview Model-Based Testing (MBT) Overview
Black-Box Testing Techniques Benefits and Challenges of MBT
White-Box Testing Techniques
Grey-Box Testing Techniques
Testing Philosophies Overview
Agile Testing Philosophy
Risk-Based Testing Philosophy
Testing Strategies Overview
Test-Driven Development (TDD)
Week 05 - Software Quality Engineering - SEN453
Assignment # 4 :
5
Scenario:
You are part of a quality testing team for an e-
commerce platform. The system includes
features such as product search, user login,
payment processing, and order tracking.
Question:
• Identify two black-box testing techniques and two
white-box testing techniques that you would
apply to test the platform. Explain how you would
use these techniques to ensure the quality of the
product.
Week 05 - Software Quality Engineering - SEN453
Software Quality Engineering
(SEN453)
SOFTWARE TESTING
TECHNIQUES (CONTINUED…)
Week # 5
Unit 2/2
Introduction to Software Testing
Techniques
7
Overview of advanced software testing
techniques focusing on model-based
testing, control-flow, data-flow, domain,
and combinatorial testing.
Week 05 - Software Quality Engineering - SEN453
Testing Using Models
8
Model-based testing (MBT) involves
using a model of the system to generate
test cases, ensuring thorough test
coverage.
Black-box testing (outside the
system)
Using UML model, Use case diagram
Transform one state to another state,
changing the behavior. (sequential
diagram)
Week 05 - Software Quality Engineering - SEN453
Benefits of Model-Based
9
Testing
1. Automated test case generation
2. Early detection of errors
3. Better test coverage and maintenance
4. Reproducibility of test scenarios
Week 05 - Software Quality Engineering - SEN453
Finite State Machine (FSM)
10
Concept: In CS, Engr, and various other fields
to design, analyze, and implement systems
with discrete and sequential behavior.
FSM is a term used by programmers,
mathematicians, engineers & other to
describe a mathematical model for any system
that has a limited number of conditional states
of being.
FSM is a model used to represent systems with
a finite number of states, and it’s useful for
defining system behavior.
FSM is a computation model that can be used
to simulate sequential logic, or, in other words,
to represent and control execution flow. FSMS
can be used to model problems in many fields,
including mathematics, artificial intelligence,
games or linguistics.
Week 05 - Software Quality Engineering - SEN453
FSM Components
11
FSM It is represented as “states,
Events, Actions & Transitions”
FSM consists of:
1. - States: current situation
2. - Transitions: movement from one state
to another
3. - Events: I/P to state
4. - Actions: activity to be performed by
state machine.
5. - State diagram representation
Week 05 - Software Quality Engineering - SEN453
FSM Testing Overview
12
Testing using FSM focuses on validating
transitions between states and ensuring
the system behaves as expected in all
possible states.
Week 05 - Software Quality Engineering - SEN453
FSM Testing Techniques
13
1. State coverage
2. Transition coverage
3. Path coverage
Example of FSM: A vending machine FSM with
states like 'Idle,' 'Dispensing,' and 'Out of Stock.'
Week 05 - Software Quality Engineering - SEN453
Control-Flow Testing
14
Overview
Control-flow testing involves testing the
execution paths in the program, ensuring
that different control structures are
properly tested.
CFT is a SW testing technique that focuses on analyzing the flow
of control through a program's code. It ensures that different
execution paths, branches, and loops within the program are
tested thoroughly to identify errors and improve software quality.
The goal is to verify that the program behaves correctly as it
moves through various decision points, conditions, and loops.
Week 05 - Software Quality Engineering - SEN453
Key Concepts of Control-Flow Testing
15
To determine the execution order of
statements or instructions of the program
through a control structure.
Key points in Control-Flow Testing:
• Path Testing: Ensures all possible paths through the
program's code are executed at least once.
• Branch Testing: Tests each decision point (such as if-else
conditions) to verify all possible outcomes.
• Condition Testing: Ensures individual conditions within
decision points are tested for both true and false values.
• Loop Testing: Focuses on testing loops, ensuring they
work correctly for zero, one, or multiple iterations.
Week 05 - Software Quality Engineering - SEN453
Data-Flow Testing Overview
16
Data-flow testing analyzes the flow of
data through the program, focusing on
how variables are defined, used, and
updated.
Week 05 - Software Quality Engineering - SEN453
Types of Data-Flow Testing
17
1. Definition-use testing
2. Definition-pair testing
3. Slice-based testing
Week 05 - Software Quality Engineering - SEN453
Example of Data-Flow
18
Testing
Example: Checking if a variable is
properly initialized before use in a
program.
Week 05 - Software Quality Engineering - SEN453
Domain Testing Overview
19
Domain testing divides input data into
valid and invalid domains and tests the
system with inputs from both domains.
Week 05 - Software Quality Engineering - SEN453
Types of Domain Testing
20
1. Boundary value testing
2. Equivalence partitioning
3. Domain validity testing
Week 05 - Software Quality Engineering - SEN453
Combinatorial Testing
21
Overview
Combinatorial testing focuses on testing
combinations of input values, ensuring
various input combinations are
thoroughly tested.
Week 05 - Software Quality Engineering - SEN453
Assignment # 5 :
22
Explain Control-Flow Testing
Define control-flow testing and describe its key
components, including path, branch, condition, and loop
testing. Provide examples for each concept to illustrate
how it helps detect errors in software.
Why is Control-Flow Testing essential in software development?
Discuss the importance of control-flow testing in identifying
logic errors early in the development process. Provide a
real-world example where control-flow testing could
enhance software reliability and quality.
Week 05 - Software Quality Engineering - SEN453