SlideShare a Scribd company logo
Software Engineering: A Practitioner’s
Approach, by Roger Pressman.
Chapter 4
 Software Testing Strategies
1
Software Engineering: A Practitioner’s
Approach, by Roger Pressman.
Software Testing
Testing is the process of
exercising a program with the
specific intent of finding errors
prior to delivery to the end
user.
2
18-Jan-23
Software Engineering: A Practitioner’s
Approach, by Roger Pressman.
What Testing Shows
errors
requirements conformance
performance
an indication
of quality
3
Software Engineering: A Practitioner’s
Approach, by Roger Pressman.
Strategic Approach
 To perform effective testing, you should conduct effective
technical reviews. By doing this, many errors will be
eliminated before testing commences.
 Testing begins at the component level and works
"outward" toward the integration of the entire computer-
based system.
 Different testing techniques are appropriate for different
software engineering approaches and at different points
in time.
 Testing is conducted by the developer of the software
and (for large projects) an independent test group.
 Testing and debugging are different activities, but
debugging must be accommodated in any testing
strategy.
4
4
Software Engineering: A Practitioner’s
Approach, by Roger Pressman.
V & V
 Verification refers to the set of tasks that
ensure that software correctly
implements a specific function.
 Validation refers to a different set of
tasks that ensure that the software that
has been built is traceable to customer
requirements. Boehm [Boe81] states this
another way:
 Verification: "Are we building the product
right?"
 Validation: "Are we building the right
product?" 5
Software Engineering: A Practitioner’s
Approach, by Roger Pressman.
Who Tests the Software?
developer independent tester
Understands the system
but, will test "gently"
and, is driven by "delivery"
Must learn about the system,
but, will attempt to break it
and, is driven by quality
6
Software Engineering: A Practitioner’s
Approach, by Roger Pressman.
Testing Strategy
System engineering
Analysis modeling
Design modeling
Code generation Unit test
Integration test
Validation test
System test
7
Software Engineering: A Practitioner’s
Approach, by Roger Pressman.
Testing Strategy
 We begin by ‘testing-in-the-small’ and move
toward ‘testing-in-the-large’
 For conventional software
 The module (component) is our initial focus
 Integration of modules follows
 For OO software
 our focus when “testing in the small” changes from an
individual module (the conventional view) to an OO
class that encompasses attributes and operations and
implies communication and collaboration
8
Software Engineering: A Practitioner’s
Approach, by Roger Pressman.
Strategic Issues
 Specify product requirements in a quantifiable manner long before
testing commences.
 State testing objectives explicitly.
 Understand the users of the software and develop a profile for each
user category.
 Develop a testing plan that emphasizes “rapid cycle testing.”
 Build “robust” software that is designed to test itself
 Use effective technical reviews as a filter prior to testing
 Conduct technical reviews to assess the test strategy and test cases
themselves.
 Develop a continuous improvement approach for the testing
process.
9
Software Engineering: A Practitioner’s
Approach, by Roger Pressman.
Unit Testing
module
to be
tested
test cases
results
software
engineer
10
Software Engineering: A Practitioner’s
Approach, by Roger Pressman.
Unit Testing
interface
local data structures
boundary conditions
independent paths
error handling paths
module
to be
tested
test cases
11
Software Engineering: A Practitioner’s
Approach, by Roger Pressman.
Unit Test Environment
Module
stub stub
driver
RESULTS
interface
local data structures
boundary conditions
independent paths
error handling paths
test cases
12
Software Engineering: A Practitioner’s
Approach, by Roger Pressman.
Integration Testing
Strategies
Options:
• the “big bang” approach
• an incremental construction strategy
13
Software Engineering: A Practitioner’s
Approach, by Roger Pressman.
Top Down
Integration
top module is tested with
stubs
stubs are replaced one at
a time, "depth first"
as new modules are integrated,
some subset of tests is re-run
A
B
C
D E
F G
14
Software Engineering: A Practitioner’s
Approach, by Roger Pressman.
Bottom-Up Integration
drivers are replaced one at a
time, "depth first"
worker modules are grouped into
builds and integrated
A
B
C
D E
F G
cluster
15
Software Engineering: A Practitioner’s
Approach, by Roger Pressman.
Sandwich Testing
Top modules are
tested with stubs
Worker modules are grouped into
builds and integrated
A
B
C
D E
F G
cluster
16
Software Engineering: A Practitioner’s
Approach, by Roger Pressman.
Regression Testing
 Regression testing is the re-execution of some
subset of tests that have already been conducted to
ensure that changes have not propagated
unintended side effects
 Whenever software is corrected, some aspect of the
software configuration (the program, its
documentation, or the data that support it) is
changed.
 Regression testing helps to ensure that changes
(due to testing or for other reasons) do not introduce
unintended behavior or additional errors.
 Regression testing may be conducted manually, by
re-executing a subset of all test cases or using
automated capture/playback tools.
17
Software Engineering: A Practitioner’s
Approach, by Roger Pressman.
Smoke Testing
 A common approach for creating “daily builds” for
product software
 Smoke testing steps:
 Software components that have been translated into code
are integrated into a “build.”
 A build includes all data files, libraries, reusable modules, and
engineered components that are required to implement one or
more product functions.
 A series of tests is designed to expose errors that will keep
the build from properly performing its function.
 The intent should be to uncover “show stopper” errors that have
the highest likelihood of throwing the software project behind
schedule.
 The build is integrated with other builds and the entire
product (in its current form) is smoke tested daily.
 The integration approach may be top down or bottom up.
18
Software Engineering: A Practitioner’s
Approach, by Roger Pressman.
Object-Oriented Testing
 Begins by evaluating the
correctness and consistency of
the analysis and design models
 Testing strategy changes
 the concept of the ‘unit’ broadens to Class
due to encapsulation
 integration focuses on classes and their
execution across a ‘thread’ or in the context of
a usage scenario
 validation uses conventional black box
methods
19
Software Engineering: A Practitioner’s
Approach, by Roger Pressman.
OO Testing Strategy
 Class testing is the equivalent of unit
testing
 operations within the class are tested
 the state behavior of the class is examined
 Integration applied with three different
strategies
 thread-based testing—integrates the set of classes
required to respond to one input or event
 use-based testing—integrates the set of classes
required to respond to one use case
 cluster testing—integrates the set of classes required
to demonstrate one collaboration
20
Software Engineering: A Practitioner’s
Approach, by Roger Pressman.
WebApp Testing
 The content model for the WebApp is
reviewed to uncover errors.
 The interface model is reviewed to ensure
that all use cases can be accommodated.
 The design model for the WebApp is
reviewed to uncover navigation errors.
 The user interface is tested to uncover errors
in presentation and/or navigation mechanics.
 Each functional component is unit tested.
21
Software Engineering: A Practitioner’s
Approach, by Roger Pressman.
WebApp Testing
 Navigation throughout the architecture is tested.
 The WebApp is implemented in a variety of
different environmental configurations and is
tested for compatibility with each configuration.
 Security tests are conducted in an attempt to
exploit vulnerabilities in the WebApp or within its
environment.
 Performance tests are conducted.
 The WebApp is tested by a controlled and
monitored population of end-users. The results
of their interaction with the system are evaluated
for content and navigation errors, usability
concerns, compatibility concerns, and WebApp
reliability and performance. 22
Software Engineering: A Practitioner’s
Approach, by Roger Pressman.
High Order Testing
 Validation testing
 Focus is on software requirements
 System testing
 Focus is on system integration
 Alpha/Beta testing
 Focus is on customer usage
 Recovery testing
 forces the software to fail in a variety of ways and verifies that
recovery is properly performed
 Security testing
 verifies that protection mechanisms built into a system will, in fact,
protect it from improper penetration
 Stress testing
 executes a system in a manner that demands resources in abnormal
quantity, frequency, or volume
 Performance Testing
 test the run-time performance of software within the context of an
integrated system 23
Software Engineering: A Practitioner’s
Approach, by Roger Pressman.
Test Case Design
"Bugs lurk in corners
and congregate at
boundaries ..."
Boris Beizer
OBJECTIVE
CRITERIA
CONSTRAINT
to uncover errors
in a complete manner
with a minimum of effort and time
24
Software Engineering: A Practitioner’s
Approach, by Roger Pressman.
White-Box Testing
... our goal is to ensure that all
statements and conditions have
been executed at least once ...
25
White-box testing
 White-box testing (also known as clear box testing, glass box
testing, transparent box testing, and structural testing) is a method of software
testing that tests internal structures or workings of an application, as opposed to its
functionality
 In white-box testing an internal perspective of the system, as well as programming
skills, are used to design test cases.
 The tester chooses inputs to exercise paths through the code and determine the
expected outputs.
 White-box testing can be applied at the unit, integration and system levels of the
software testing process..
White-box test design techniques include :
 Control flow testing
 Data flow testing
 Branch testing
 Statement coverage
 Decision coverage
 Modified condition/decision coverage
 Prime path testing
 Path testing Software Engineering: A Practitioner’s
Approach, by Roger Pressman.
26
Software Engineering: A Practitioner’s
Approach, by Roger Pressman.
Black-Box Testing
requirements
events
input
output
27
Black-box testing
Black-box testing is a method of software testing that examines the functionality of an
application without peering into its internal structures or workings. This method of test can be
applied virtually to every level of software testing: unit, integration, system and acceptance. It
is sometimes referred to as specification-based testing.
 Specific knowledge of the application's code, internal structure and programming knowledge
in general is not required.
 The tester is aware of what the software is supposed to do but is not aware of how it does it
Test cases
 Test cases are built around specifications and requirements,and design parameters.
 i.e., what the application is supposed to do.
Test design techniques
 Decision table testing
 All-pairs testing
 Equivalence partitioning
 Boundary value analysis
 Cause–effect graph
 Error guessing
 State transition testing
 Use case testing
 User story testing
 Domain analysis
 Syntax testing
Software Engineering: A Practitioner’s
Approach, by Roger Pressman.
28
Software Engineering: A Practitioner’s
Approach, by Roger Pressman.
Debugging: A Diagnostic Process
29
Software Engineering: A Practitioner’s
Approach, by Roger Pressman.
Debugging Process
30
Software Engineering: A Practitioner’s
Approach, by Roger Pressman.
Debugging Effort
time required
to diagnose the
symptom and
determine the
cause
time required
to correct the error
and conduct
regression tests
31
Software Engineering: A Practitioner’s
Approach, by Roger Pressman.
Symptoms & Causes
symptom
cause
symptom and cause may be
geographically separated
symptom may disappear when
another problem is fixed
cause may be due to a
combination of non-errors
cause may be due to a system
or compiler error
cause may be due to
assumptions that everyone
believes
symptom may be intermittent
32
Software Engineering: A Practitioner’s
Approach, by Roger Pressman.
Consequences of Bugs
damage
mild
annoying
disturbing
serious
extreme
catastrophic
infectious
Bug Type
Bug Categories: function-related bugs,
system-related bugs, data bugs, coding bugs,
design bugs, documentation bugs, standards
violations, etc.
33
Software Engineering: A Practitioner’s
Approach, by Roger Pressman.
Debugging Techniques
• Brute force Testing
• Backtracking
• Cause Elimination
34
Strategy #1: Brute Force
 Most commonly used and least
efficient method
 Used when all else fails
 Involves the use of memory dumps,
run-time traces, and output
statements
 Leads many times to wasted effort
and time Software Engineering: A Practitioner’s
Approach, by Roger Pressman. 35
Strategy #2: Backtracking
 Can be used successfully in small programs
 The method starts at the location where a
symptom has been uncovered
 The source code is then traced backward
(manually) until the location of the cause is
found
 In large programs, the number of potential
backward paths may become unmanageably
large
Software Engineering: A Practitioner’s
Approach, by Roger Pressman. 36
Strategy #3: Cause Elimination
 Involves the use of induction or deduction and
introduces the concept of binary partitioning
 Induction (specific to general) : Prove that a specific
starting value is true; then prove the general case is true
 Deduction (general to specific): Show that a specific
conclusion follows from a set of general premises
 Data related to the error occurrence are
organized to isolate potential causes
 A cause hypothesis is devised, and the
aforementioned data are used to prove or
disprove the hypothesis
 Alternatively, a list of all possible causes is
developed, and tests are conducted to
eliminate each cause
Software Engineering: A Practitioner’s
Approach, by Roger Pressman. 37
Software Engineering: A Practitioner’s
Approach, by Roger Pressman.
Correcting the Error
 Is the cause of the bug reproduced in another part of
the program? In many situations, a program defect is
caused by an erroneous pattern of logic that may be
reproduced elsewhere.
 What "next bug" might be introduced by the fix I'm
about to make? Before the correction is made, the
source code (or, better, the design) should be evaluated
to assess coupling of logic and data structures.
 What could we have done to prevent this bug in the first
place? This question is the first step toward
establishing a statistical software quality assurance
approach. If you correct the process as well as the
product, the bug will be removed from the current
program and may be eliminated from all future
programs.
38
Software Engineering: A Practitioner’s
Approach, by Roger Pressman.
Final Thoughts
 Think -- before you act to correct
 Use tools to gain additional
insight
 If you’re at an impasse, get help
from someone else
 Once you correct the bug, use
regression testing to uncover any
side effects
39
End of the Chapter 4
40

More Related Content

Similar to Chapter 4 Software Testing_Finalised_BW.ppt

Ian Sommerville, Software Engineering, 9th EditionCh 8
Ian Sommerville,  Software Engineering, 9th EditionCh 8Ian Sommerville,  Software Engineering, 9th EditionCh 8
Ian Sommerville, Software Engineering, 9th EditionCh 8Mohammed Romi
 
Software testing
Software testingSoftware testing
Software testingSengu Msc
 
Software testing
Software testingSoftware testing
Software testingSengu Msc
 
Software Testing - A sneak preview By Srikanth
Software Testing - A sneak preview By SrikanthSoftware Testing - A sneak preview By Srikanth
Software Testing - A sneak preview By SrikanthSrikanth Krishnamoorthy
 
How to Make the Most of Regression and Unit Testing.pdf
How to Make the Most of Regression and Unit Testing.pdfHow to Make the Most of Regression and Unit Testing.pdf
How to Make the Most of Regression and Unit Testing.pdfAbhay Kumar
 
Session 05 - Testing Concepts
Session 05 - Testing ConceptsSession 05 - Testing Concepts
Session 05 - Testing ConceptsPoojaLQA
 
The growing importance of Regression Testing
The growing importance of Regression TestingThe growing importance of Regression Testing
The growing importance of Regression TestingSerena Gray
 
11 steps of testing process - By Harshil Barot
11 steps of testing process - By Harshil Barot11 steps of testing process - By Harshil Barot
11 steps of testing process - By Harshil BarotHarshil Barot
 
softwaretestingppt-FINAL-PPT-1
softwaretestingppt-FINAL-PPT-1softwaretestingppt-FINAL-PPT-1
softwaretestingppt-FINAL-PPT-1FAIZALSAIYED
 
Software testing basic
Software testing basicSoftware testing basic
Software testing basicRohit Singh
 
Networkkskskskskhdhdhshshshshhsheusus .ppt
Networkkskskskskhdhdhshshshshhsheusus .pptNetworkkskskskskhdhdhshshshshhsheusus .ppt
Networkkskskskskhdhdhshshshshhsheusus .pptabdulbasetalselwi
 
Manual testing
Manual testingManual testing
Manual testingVivek V
 
MIT521 software testing (2012) v2
MIT521   software testing  (2012) v2MIT521   software testing  (2012) v2
MIT521 software testing (2012) v2Yudep Apoi
 
Object Oriented Testing
Object Oriented TestingObject Oriented Testing
Object Oriented TestingAMITJain879
 
Testing Types And Models
Testing Types And ModelsTesting Types And Models
Testing Types And Modelsnazeer pasha
 
Software testing services in India .pptx
Software testing services in India .pptxSoftware testing services in India .pptx
Software testing services in India .pptxSakshiPatel82
 

Similar to Chapter 4 Software Testing_Finalised_BW.ppt (20)

Ian Sommerville, Software Engineering, 9th EditionCh 8
Ian Sommerville,  Software Engineering, 9th EditionCh 8Ian Sommerville,  Software Engineering, 9th EditionCh 8
Ian Sommerville, Software Engineering, 9th EditionCh 8
 
Software testing
Software testingSoftware testing
Software testing
 
Software testing
Software testingSoftware testing
Software testing
 
Software Testing - A sneak preview By Srikanth
Software Testing - A sneak preview By SrikanthSoftware Testing - A sneak preview By Srikanth
Software Testing - A sneak preview By Srikanth
 
How to Make the Most of Regression and Unit Testing.pdf
How to Make the Most of Regression and Unit Testing.pdfHow to Make the Most of Regression and Unit Testing.pdf
How to Make the Most of Regression and Unit Testing.pdf
 
Manual testing
Manual testingManual testing
Manual testing
 
Testing strategies
Testing strategiesTesting strategies
Testing strategies
 
Session 05 - Testing Concepts
Session 05 - Testing ConceptsSession 05 - Testing Concepts
Session 05 - Testing Concepts
 
The growing importance of Regression Testing
The growing importance of Regression TestingThe growing importance of Regression Testing
The growing importance of Regression Testing
 
11 steps of testing process - By Harshil Barot
11 steps of testing process - By Harshil Barot11 steps of testing process - By Harshil Barot
11 steps of testing process - By Harshil Barot
 
softwaretestingppt-FINAL-PPT-1
softwaretestingppt-FINAL-PPT-1softwaretestingppt-FINAL-PPT-1
softwaretestingppt-FINAL-PPT-1
 
Software testing basic
Software testing basicSoftware testing basic
Software testing basic
 
Networkkskskskskhdhdhshshshshhsheusus .ppt
Networkkskskskskhdhdhshshshshhsheusus .pptNetworkkskskskskhdhdhshshshshhsheusus .ppt
Networkkskskskskhdhdhshshshshhsheusus .ppt
 
Manual testing
Manual testingManual testing
Manual testing
 
Testing ppt
Testing pptTesting ppt
Testing ppt
 
MIT521 software testing (2012) v2
MIT521   software testing  (2012) v2MIT521   software testing  (2012) v2
MIT521 software testing (2012) v2
 
Object Oriented Testing
Object Oriented TestingObject Oriented Testing
Object Oriented Testing
 
Software testing strategies
Software testing strategiesSoftware testing strategies
Software testing strategies
 
Testing Types And Models
Testing Types And ModelsTesting Types And Models
Testing Types And Models
 
Software testing services in India .pptx
Software testing services in India .pptxSoftware testing services in India .pptx
Software testing services in India .pptx
 

More from Bule Hora University

Chapter 2_Process Models sunorgamisedASE_finalised.ppt
Chapter 2_Process Models sunorgamisedASE_finalised.pptChapter 2_Process Models sunorgamisedASE_finalised.ppt
Chapter 2_Process Models sunorgamisedASE_finalised.pptBule Hora University
 
Chapter 1_Introduction sunorganisedASE_finalised.pptx
Chapter 1_Introduction sunorganisedASE_finalised.pptxChapter 1_Introduction sunorganisedASE_finalised.pptx
Chapter 1_Introduction sunorganisedASE_finalised.pptxBule Hora University
 
Chapter 5 Software Quality Assurance-Finalised_BW.ppt
Chapter 5 Software Quality Assurance-Finalised_BW.pptChapter 5 Software Quality Assurance-Finalised_BW.ppt
Chapter 5 Software Quality Assurance-Finalised_BW.pptBule Hora University
 
Chapter 3_Software Design sunorganisedASE_BW_finalised.ppt
Chapter 3_Software Design sunorganisedASE_BW_finalised.pptChapter 3_Software Design sunorganisedASE_BW_finalised.ppt
Chapter 3_Software Design sunorganisedASE_BW_finalised.pptBule Hora University
 
Chapter1 Advanced Software Engineering overview
Chapter1 Advanced Software Engineering overviewChapter1 Advanced Software Engineering overview
Chapter1 Advanced Software Engineering overviewBule Hora University
 
Chapter1 intro network_security_sunorganised
Chapter1 intro network_security_sunorganisedChapter1 intro network_security_sunorganised
Chapter1 intro network_security_sunorganisedBule Hora University
 

More from Bule Hora University (6)

Chapter 2_Process Models sunorgamisedASE_finalised.ppt
Chapter 2_Process Models sunorgamisedASE_finalised.pptChapter 2_Process Models sunorgamisedASE_finalised.ppt
Chapter 2_Process Models sunorgamisedASE_finalised.ppt
 
Chapter 1_Introduction sunorganisedASE_finalised.pptx
Chapter 1_Introduction sunorganisedASE_finalised.pptxChapter 1_Introduction sunorganisedASE_finalised.pptx
Chapter 1_Introduction sunorganisedASE_finalised.pptx
 
Chapter 5 Software Quality Assurance-Finalised_BW.ppt
Chapter 5 Software Quality Assurance-Finalised_BW.pptChapter 5 Software Quality Assurance-Finalised_BW.ppt
Chapter 5 Software Quality Assurance-Finalised_BW.ppt
 
Chapter 3_Software Design sunorganisedASE_BW_finalised.ppt
Chapter 3_Software Design sunorganisedASE_BW_finalised.pptChapter 3_Software Design sunorganisedASE_BW_finalised.ppt
Chapter 3_Software Design sunorganisedASE_BW_finalised.ppt
 
Chapter1 Advanced Software Engineering overview
Chapter1 Advanced Software Engineering overviewChapter1 Advanced Software Engineering overview
Chapter1 Advanced Software Engineering overview
 
Chapter1 intro network_security_sunorganised
Chapter1 intro network_security_sunorganisedChapter1 intro network_security_sunorganised
Chapter1 intro network_security_sunorganised
 

Recently uploaded

GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...Nguyen Thanh Tu Collection
 
The Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. HenryThe Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. HenryEugene Lysak
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxEduSkills OECD
 
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...Sayali Powar
 
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptxslides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptxCapitolTechU
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaasiemaillard
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfjoachimlavalley1
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonSteve Thomason
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersPedroFerreira53928
 
Gyanartha SciBizTech Quiz slideshare.pptx
Gyanartha SciBizTech Quiz slideshare.pptxGyanartha SciBizTech Quiz slideshare.pptx
Gyanartha SciBizTech Quiz slideshare.pptxShibin Azad
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXMIRIAMSALINAS13
 
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdfDanh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdfQucHHunhnh
 
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General QuizPragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General QuizPragya - UEM Kolkata Quiz Club
 
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdfINU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdfbu07226
 
Benefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational ResourcesBenefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational Resourcesdimpy50
 
How to Manage Notification Preferences in the Odoo 17
How to Manage Notification Preferences in the Odoo 17How to Manage Notification Preferences in the Odoo 17
How to Manage Notification Preferences in the Odoo 17Celine George
 
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.pptBasic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.pptSourabh Kumar
 

Recently uploaded (20)

GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
The Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. HenryThe Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. Henry
 
NCERT Solutions Power Sharing Class 10 Notes pdf
NCERT Solutions Power Sharing Class 10 Notes pdfNCERT Solutions Power Sharing Class 10 Notes pdf
NCERT Solutions Power Sharing Class 10 Notes pdf
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
 
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptxslides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
Mattingly "AI & Prompt Design: Limitations and Solutions with LLMs"
Mattingly "AI & Prompt Design: Limitations and Solutions with LLMs"Mattingly "AI & Prompt Design: Limitations and Solutions with LLMs"
Mattingly "AI & Prompt Design: Limitations and Solutions with LLMs"
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
Gyanartha SciBizTech Quiz slideshare.pptx
Gyanartha SciBizTech Quiz slideshare.pptxGyanartha SciBizTech Quiz slideshare.pptx
Gyanartha SciBizTech Quiz slideshare.pptx
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdfDanh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
 
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General QuizPragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
 
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdfINU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
 
Benefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational ResourcesBenefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational Resources
 
How to Manage Notification Preferences in the Odoo 17
How to Manage Notification Preferences in the Odoo 17How to Manage Notification Preferences in the Odoo 17
How to Manage Notification Preferences in the Odoo 17
 
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.pptBasic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
 

Chapter 4 Software Testing_Finalised_BW.ppt

  • 1. Software Engineering: A Practitioner’s Approach, by Roger Pressman. Chapter 4  Software Testing Strategies 1
  • 2. Software Engineering: A Practitioner’s Approach, by Roger Pressman. Software Testing Testing is the process of exercising a program with the specific intent of finding errors prior to delivery to the end user. 2 18-Jan-23
  • 3. Software Engineering: A Practitioner’s Approach, by Roger Pressman. What Testing Shows errors requirements conformance performance an indication of quality 3
  • 4. Software Engineering: A Practitioner’s Approach, by Roger Pressman. Strategic Approach  To perform effective testing, you should conduct effective technical reviews. By doing this, many errors will be eliminated before testing commences.  Testing begins at the component level and works "outward" toward the integration of the entire computer- based system.  Different testing techniques are appropriate for different software engineering approaches and at different points in time.  Testing is conducted by the developer of the software and (for large projects) an independent test group.  Testing and debugging are different activities, but debugging must be accommodated in any testing strategy. 4 4
  • 5. Software Engineering: A Practitioner’s Approach, by Roger Pressman. V & V  Verification refers to the set of tasks that ensure that software correctly implements a specific function.  Validation refers to a different set of tasks that ensure that the software that has been built is traceable to customer requirements. Boehm [Boe81] states this another way:  Verification: "Are we building the product right?"  Validation: "Are we building the right product?" 5
  • 6. Software Engineering: A Practitioner’s Approach, by Roger Pressman. Who Tests the Software? developer independent tester Understands the system but, will test "gently" and, is driven by "delivery" Must learn about the system, but, will attempt to break it and, is driven by quality 6
  • 7. Software Engineering: A Practitioner’s Approach, by Roger Pressman. Testing Strategy System engineering Analysis modeling Design modeling Code generation Unit test Integration test Validation test System test 7
  • 8. Software Engineering: A Practitioner’s Approach, by Roger Pressman. Testing Strategy  We begin by ‘testing-in-the-small’ and move toward ‘testing-in-the-large’  For conventional software  The module (component) is our initial focus  Integration of modules follows  For OO software  our focus when “testing in the small” changes from an individual module (the conventional view) to an OO class that encompasses attributes and operations and implies communication and collaboration 8
  • 9. Software Engineering: A Practitioner’s Approach, by Roger Pressman. Strategic Issues  Specify product requirements in a quantifiable manner long before testing commences.  State testing objectives explicitly.  Understand the users of the software and develop a profile for each user category.  Develop a testing plan that emphasizes “rapid cycle testing.”  Build “robust” software that is designed to test itself  Use effective technical reviews as a filter prior to testing  Conduct technical reviews to assess the test strategy and test cases themselves.  Develop a continuous improvement approach for the testing process. 9
  • 10. Software Engineering: A Practitioner’s Approach, by Roger Pressman. Unit Testing module to be tested test cases results software engineer 10
  • 11. Software Engineering: A Practitioner’s Approach, by Roger Pressman. Unit Testing interface local data structures boundary conditions independent paths error handling paths module to be tested test cases 11
  • 12. Software Engineering: A Practitioner’s Approach, by Roger Pressman. Unit Test Environment Module stub stub driver RESULTS interface local data structures boundary conditions independent paths error handling paths test cases 12
  • 13. Software Engineering: A Practitioner’s Approach, by Roger Pressman. Integration Testing Strategies Options: • the “big bang” approach • an incremental construction strategy 13
  • 14. Software Engineering: A Practitioner’s Approach, by Roger Pressman. Top Down Integration top module is tested with stubs stubs are replaced one at a time, "depth first" as new modules are integrated, some subset of tests is re-run A B C D E F G 14
  • 15. Software Engineering: A Practitioner’s Approach, by Roger Pressman. Bottom-Up Integration drivers are replaced one at a time, "depth first" worker modules are grouped into builds and integrated A B C D E F G cluster 15
  • 16. Software Engineering: A Practitioner’s Approach, by Roger Pressman. Sandwich Testing Top modules are tested with stubs Worker modules are grouped into builds and integrated A B C D E F G cluster 16
  • 17. Software Engineering: A Practitioner’s Approach, by Roger Pressman. Regression Testing  Regression testing is the re-execution of some subset of tests that have already been conducted to ensure that changes have not propagated unintended side effects  Whenever software is corrected, some aspect of the software configuration (the program, its documentation, or the data that support it) is changed.  Regression testing helps to ensure that changes (due to testing or for other reasons) do not introduce unintended behavior or additional errors.  Regression testing may be conducted manually, by re-executing a subset of all test cases or using automated capture/playback tools. 17
  • 18. Software Engineering: A Practitioner’s Approach, by Roger Pressman. Smoke Testing  A common approach for creating “daily builds” for product software  Smoke testing steps:  Software components that have been translated into code are integrated into a “build.”  A build includes all data files, libraries, reusable modules, and engineered components that are required to implement one or more product functions.  A series of tests is designed to expose errors that will keep the build from properly performing its function.  The intent should be to uncover “show stopper” errors that have the highest likelihood of throwing the software project behind schedule.  The build is integrated with other builds and the entire product (in its current form) is smoke tested daily.  The integration approach may be top down or bottom up. 18
  • 19. Software Engineering: A Practitioner’s Approach, by Roger Pressman. Object-Oriented Testing  Begins by evaluating the correctness and consistency of the analysis and design models  Testing strategy changes  the concept of the ‘unit’ broadens to Class due to encapsulation  integration focuses on classes and their execution across a ‘thread’ or in the context of a usage scenario  validation uses conventional black box methods 19
  • 20. Software Engineering: A Practitioner’s Approach, by Roger Pressman. OO Testing Strategy  Class testing is the equivalent of unit testing  operations within the class are tested  the state behavior of the class is examined  Integration applied with three different strategies  thread-based testing—integrates the set of classes required to respond to one input or event  use-based testing—integrates the set of classes required to respond to one use case  cluster testing—integrates the set of classes required to demonstrate one collaboration 20
  • 21. Software Engineering: A Practitioner’s Approach, by Roger Pressman. WebApp Testing  The content model for the WebApp is reviewed to uncover errors.  The interface model is reviewed to ensure that all use cases can be accommodated.  The design model for the WebApp is reviewed to uncover navigation errors.  The user interface is tested to uncover errors in presentation and/or navigation mechanics.  Each functional component is unit tested. 21
  • 22. Software Engineering: A Practitioner’s Approach, by Roger Pressman. WebApp Testing  Navigation throughout the architecture is tested.  The WebApp is implemented in a variety of different environmental configurations and is tested for compatibility with each configuration.  Security tests are conducted in an attempt to exploit vulnerabilities in the WebApp or within its environment.  Performance tests are conducted.  The WebApp is tested by a controlled and monitored population of end-users. The results of their interaction with the system are evaluated for content and navigation errors, usability concerns, compatibility concerns, and WebApp reliability and performance. 22
  • 23. Software Engineering: A Practitioner’s Approach, by Roger Pressman. High Order Testing  Validation testing  Focus is on software requirements  System testing  Focus is on system integration  Alpha/Beta testing  Focus is on customer usage  Recovery testing  forces the software to fail in a variety of ways and verifies that recovery is properly performed  Security testing  verifies that protection mechanisms built into a system will, in fact, protect it from improper penetration  Stress testing  executes a system in a manner that demands resources in abnormal quantity, frequency, or volume  Performance Testing  test the run-time performance of software within the context of an integrated system 23
  • 24. Software Engineering: A Practitioner’s Approach, by Roger Pressman. Test Case Design "Bugs lurk in corners and congregate at boundaries ..." Boris Beizer OBJECTIVE CRITERIA CONSTRAINT to uncover errors in a complete manner with a minimum of effort and time 24
  • 25. Software Engineering: A Practitioner’s Approach, by Roger Pressman. White-Box Testing ... our goal is to ensure that all statements and conditions have been executed at least once ... 25
  • 26. White-box testing  White-box testing (also known as clear box testing, glass box testing, transparent box testing, and structural testing) is a method of software testing that tests internal structures or workings of an application, as opposed to its functionality  In white-box testing an internal perspective of the system, as well as programming skills, are used to design test cases.  The tester chooses inputs to exercise paths through the code and determine the expected outputs.  White-box testing can be applied at the unit, integration and system levels of the software testing process.. White-box test design techniques include :  Control flow testing  Data flow testing  Branch testing  Statement coverage  Decision coverage  Modified condition/decision coverage  Prime path testing  Path testing Software Engineering: A Practitioner’s Approach, by Roger Pressman. 26
  • 27. Software Engineering: A Practitioner’s Approach, by Roger Pressman. Black-Box Testing requirements events input output 27
  • 28. Black-box testing Black-box testing is a method of software testing that examines the functionality of an application without peering into its internal structures or workings. This method of test can be applied virtually to every level of software testing: unit, integration, system and acceptance. It is sometimes referred to as specification-based testing.  Specific knowledge of the application's code, internal structure and programming knowledge in general is not required.  The tester is aware of what the software is supposed to do but is not aware of how it does it Test cases  Test cases are built around specifications and requirements,and design parameters.  i.e., what the application is supposed to do. Test design techniques  Decision table testing  All-pairs testing  Equivalence partitioning  Boundary value analysis  Cause–effect graph  Error guessing  State transition testing  Use case testing  User story testing  Domain analysis  Syntax testing Software Engineering: A Practitioner’s Approach, by Roger Pressman. 28
  • 29. Software Engineering: A Practitioner’s Approach, by Roger Pressman. Debugging: A Diagnostic Process 29
  • 30. Software Engineering: A Practitioner’s Approach, by Roger Pressman. Debugging Process 30
  • 31. Software Engineering: A Practitioner’s Approach, by Roger Pressman. Debugging Effort time required to diagnose the symptom and determine the cause time required to correct the error and conduct regression tests 31
  • 32. Software Engineering: A Practitioner’s Approach, by Roger Pressman. Symptoms & Causes symptom cause symptom and cause may be geographically separated symptom may disappear when another problem is fixed cause may be due to a combination of non-errors cause may be due to a system or compiler error cause may be due to assumptions that everyone believes symptom may be intermittent 32
  • 33. Software Engineering: A Practitioner’s Approach, by Roger Pressman. Consequences of Bugs damage mild annoying disturbing serious extreme catastrophic infectious Bug Type Bug Categories: function-related bugs, system-related bugs, data bugs, coding bugs, design bugs, documentation bugs, standards violations, etc. 33
  • 34. Software Engineering: A Practitioner’s Approach, by Roger Pressman. Debugging Techniques • Brute force Testing • Backtracking • Cause Elimination 34
  • 35. Strategy #1: Brute Force  Most commonly used and least efficient method  Used when all else fails  Involves the use of memory dumps, run-time traces, and output statements  Leads many times to wasted effort and time Software Engineering: A Practitioner’s Approach, by Roger Pressman. 35
  • 36. Strategy #2: Backtracking  Can be used successfully in small programs  The method starts at the location where a symptom has been uncovered  The source code is then traced backward (manually) until the location of the cause is found  In large programs, the number of potential backward paths may become unmanageably large Software Engineering: A Practitioner’s Approach, by Roger Pressman. 36
  • 37. Strategy #3: Cause Elimination  Involves the use of induction or deduction and introduces the concept of binary partitioning  Induction (specific to general) : Prove that a specific starting value is true; then prove the general case is true  Deduction (general to specific): Show that a specific conclusion follows from a set of general premises  Data related to the error occurrence are organized to isolate potential causes  A cause hypothesis is devised, and the aforementioned data are used to prove or disprove the hypothesis  Alternatively, a list of all possible causes is developed, and tests are conducted to eliminate each cause Software Engineering: A Practitioner’s Approach, by Roger Pressman. 37
  • 38. Software Engineering: A Practitioner’s Approach, by Roger Pressman. Correcting the Error  Is the cause of the bug reproduced in another part of the program? In many situations, a program defect is caused by an erroneous pattern of logic that may be reproduced elsewhere.  What "next bug" might be introduced by the fix I'm about to make? Before the correction is made, the source code (or, better, the design) should be evaluated to assess coupling of logic and data structures.  What could we have done to prevent this bug in the first place? This question is the first step toward establishing a statistical software quality assurance approach. If you correct the process as well as the product, the bug will be removed from the current program and may be eliminated from all future programs. 38
  • 39. Software Engineering: A Practitioner’s Approach, by Roger Pressman. Final Thoughts  Think -- before you act to correct  Use tools to gain additional insight  If you’re at an impasse, get help from someone else  Once you correct the bug, use regression testing to uncover any side effects 39
  • 40. End of the Chapter 4 40