SlideShare une entreprise Scribd logo
MEETING 13
DEBUGGING (PART 2)
SOFTWARE TESTING
By : Ajeng Savitri Puspaningrum, M.Kom
OBJECTIVE
• Learning Debugging
Techniques
Intro
4
The best way to do debugging is to have a
systematic way of sneaking up on the problem
There are many popular debugging
approaches, but the success of any approach is
dependent upon the understanding of the
program
5
DEBUGGING METHOD
• Of the two aspects of debugging, locating the error and correcting it,
locating the error represents perhaps 95 percent of the problem.
• So there are many techniques to do debugging, such as:
• Brute Force Method
• Cause Elimination Method
• Trial and Error Method
• Backtracking and forward tracking
• Etc.
Brute Force
Method
7
BRUTE FORCE METHOD
• Most common and least efficient for isolating the cause of a software
error.
• We apply this method when all else fails.
• This method obtains and studies a printout of all registers and
relevant memory locations.
• All dumps should be well documented and retained for possible use
on subsequent problems.
• It requires little thought and is the least
mentally taxing of the methods.
8
BRUTE FORCE METHOD (cont.)
• In this approach, memory dumps are taken, run time traces are
invoked and the program is loaded with print statements.
• When this is done, we may find a clue in the information produced
which leads to the identification of the cause of a bug.
• Memory traces are similar to memory dumps, except that the
printout contains only certain memory and register contents and
printing is conditional on some event occurring.
9
BRUTE FORCE METHOD (cont.)
• Typically conditional events are entry, exit, or use of one of the
following:
• A particular subroutine, statement, or database
• Communication with I/O devices
• Value of a variable
• Timed actions (periodic or random) in a certain real-time system.
• A special problem with trace programs is that the conditions are
entered in the source code and any changes require a recompilation.
• A huge amount of data is generated, which, although may help to
identify the cause, may be difficult to manage and analyze.
10
CATEGORIES OF BRUTE-FORCE
• Brute-force methods can be partitioned into at least
three categories:
1. Debugging with a storage dump.
2. Debugging according to the common suggestion to ‘‘scatter
print statements throughout your program.’’?
3. Debugging with automated debugging tools.
11
DEBUGGING WITH A STORAGE DUMP
• The most inefficient of the brute-force methods because :
• Difficult to establish a correspondence between memory locations and the variables
in a source program.
• With any program of reasonable complexity, such a memory dump will produce a
massive amount of data, most of which is irrelevant.
• A memory dump is a static picture of the program, showing the state of the program
at only one instant in time; to find errors, you have to study the dynamics of a
program (state changes over time).
• Rarely produced at the exact point of the error, so it doesn’t show
the program’s state at the point of the error. Program actions between
the time of the dump and the time of the error can mask the clues
you need to find the error.
• Adequate methodologies don’t exist for finding errors by
analyzing a memory dump
12
DEBUGGING ACCORDING TO THE
COMMON SUGGESTION
• Better than a memory dump because it shows the dynamics of a program
and lets you examine information that is easier to relate to the source
program.
• But this method has many shortcomings, such as:
• Rather than encouraging you to think about the problem, it is largely a hit-or-miss
method.
• It produces a massive amount of data to be analyzed.
• It requires you to change the program; such changes can mask the error, alter critical
timing relationships, or introduce new errors.
• It may work on small programs, but the cost of using it in large programs is
quite high. Furthermore, it often is not even feasible on certain types of
programs such as operating systems or process control programs.
13
DEBUGGING WITH AUTOMATED
DEBUGGING TOOLS
• Done by analyzing the dynamics of the program with the
debugging features of the programming language or
special interactive debugging tools.
• A common capability and function of debugging tools are
to set breakpoints that cause the program to be
suspended when a particular statement is executed or
when a particular variable is altered, so it is enabling the
programmer to examine the current state of the program.
Cause Elimination
Method
15
CAUSE ELIMINATION METHOD
• Manifested by induction or deduction and also introduces the concept of
binary partitioning.
• Data related to error occurrence are organized to isolate potential causes.
• A cause hypothesis is devised and the 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.
• Therefore, we may rule out causes one by one until a
single one remains for validation. The cause is identified,
properly fixed, and re-tested accordingly.
16
DEBUGGING BY INDUCTION
• Done by a move from the particulars of a situation to
the whole
• Start with the clues (the symptoms of the error and
possibly the results of one or more test cases) and look
for relationships among the clues
17
THE INDUCTIVE DEBUGGING PROCESS
18
THE INDUCTIVE DEBUGGING STEPS
The steps are as follows:
1. Locate the pertinent data.
2. Organize the data.
3. Devise a hypothesis.
4. Prove the hypothesis.
5. Fix the problem.
19
DEBUGGING BY DEDUCTION
• Proceeds from some general theories or premises, using
the processes of elimination and refinement, to arrive at
a conclusion (the location of the error)
• Start with a set of suspects and, by the process of
elimination and refinement, decide that the problem
must have done it.
20
THE DEDUCTIVE DEBUGGING PROCESS
21
THE DEDUCTIVE DEBUGGING STEPS
The steps are as follows:
1. Enumerate the possible causes or
hypotheses.
2. Use the data to eliminate possible
causes.
3. Refine the remaining hypothesis.
4. Prove the remaining hypothesis.
5. Fix the error.
Other
Method
23
TRIAL AND ERROR METHOD
• Dependent on the ability and experience of the
debugging persons.
• Based on experience and intelligence, and also using the
‘hit and trial’ technique, the bug is located and a
solution is found.
• This is a slow approach and becomes impractical in large
programs.
24
BACKTRACKING METHOD
• This can be used successfully in small programs.
• Start at the point where the program gives an incorrect
result such as an unexpected output being printed.
• After analyzing the output, we trace backward the source code
manually until the cause of the failure is found.
• The source code, from the statement where symptoms of the
failure are found, to the states where the cause of failure is
found, is analyzed properly.
25
BACKTRACKING METHOD (cont.)
• Another obvious variation of backtracking is forward
tracking, where we use print statements or other means to
examine a succession of intermediate results to determine
at what point the result first became wrong.
• Backtracking and forward tracking approaches may be
useful only when the size of the program is small. As the
program size increases, it becomes difficult to manage
these approaches.
Debugging
Principles
27
ERROR-LOCATING PRINCIPLES
• Think
• If You Reach an Impasse, Sleep on It
• If You Reach an Impasse, Describe the
Problem to Someone Else
• Use Debugging Tools Only as a Second
Resort
• Avoid Experimentation—Use It Only as a
Last Resort
28
ERROR-REPAIRING PRINCIPLES
• Where There Is One Bug, There Is Likely to Be Another
• Fix the Error, Not Just a Symptom of It
• The Probability of the Fix Being Correct Is Not 100 Percent
• The Probability of the Fix Being Correct Drops as the Size of the
Program Increases
• Beware of the Possibility That an Error Correction Creates a New Error
• The Process of Error Repair Should Put You
Temporarily Back into the Design Phase
• Change the Source Code, Not the Object Code
29
ERROR ANALYSIS
A careful analysis might include the
following studies:
• Where was the error made?
• Who made the error?
• What was done incorrectly?
• How could the error have been prevented?
• How could the error have been prevented?
• How could the error have been detected
earlier? Careful
References
Chopra, R. (2018). Software Testing: Principles and Practices.
Mercury Learning & Information.
02
Majchrzak, T. A. (2012). Improving Software Testing: Technical And
Organizational Developments. Springer Science & Business Media.
03
Myers, G. J., Sandler, C., & Badgett, T. (2012). The Art Of Software
Testing. John Wiley & Sons.
04
Dooley, J. F., & Dooley. (2017). Software Development, Design and
Coding. Apress.
01
Singh, Y. (2011). Software Testing. Cambridge University Press
05
THANK YOU
Insert the Subtitle of Your Presentation

Contenu connexe

Tendances

Black box & white-box testing technique
Black box & white-box testing techniqueBlack box & white-box testing technique
Black box & white-box testing technique
SivaprasanthRentala1975
 
Software Testing or Quality Assurance
Software Testing or Quality AssuranceSoftware Testing or Quality Assurance
Software Testing or Quality Assurance
Trimantra Software Solutions
 
Software testing ppt
Software testing pptSoftware testing ppt
Software testing ppt
Savyasachi14
 
Se (techniques for black box testing ppt)
Se (techniques for black box testing ppt)Se (techniques for black box testing ppt)
Se (techniques for black box testing ppt)
Mani Kanth
 
Introduction to software testing
Introduction to software testingIntroduction to software testing
Introduction to software testing
Hadi Fadlallah
 
White box testing
White box testingWhite box testing
White box testing
Neethu Tressa
 
SOFTWARE TESTING
SOFTWARE TESTINGSOFTWARE TESTING
SOFTWARE TESTING
Priyanka Karancy
 
Software Testing - Software Quality
Software Testing - Software QualitySoftware Testing - Software Quality
Software Testing - Software Quality
Ajeng Savitri
 
Black box software testing
Black box software testingBlack box software testing
Black box software testing
Rana Muhammad Asif
 
Regression testing
Regression testingRegression testing
Regression testing
Anamta Sayyed
 
Basic software-testing-concepts
Basic software-testing-conceptsBasic software-testing-concepts
Basic software-testing-concepts
medsherb
 
Sanity testing and smoke testing
Sanity testing and smoke testingSanity testing and smoke testing
Sanity testing and smoke testing
MUHAMMAD FARHAN ASLAM
 
Software Testing Introduction
Software Testing IntroductionSoftware Testing Introduction
Software Testing Introduction
ArunKumar5524
 
System Testing.pptx
System Testing.pptxSystem Testing.pptx
System Testing.pptx
KarthigaiSelviS3
 
Software Testing
Software TestingSoftware Testing
Software Testing
Ecaterina Moraru (Valica)
 
Software Testing Strategies
Software Testing StrategiesSoftware Testing Strategies
Software Testing Strategies
Alpana Bhaskar
 
Software testing
Software testingSoftware testing
Software testing
Madhumita Chatterjee
 
Software Testing 101
Software Testing 101Software Testing 101
Software Testing 101
QA Hannah
 
Software Testing Life Cycle
Software Testing Life CycleSoftware Testing Life Cycle
Software Testing Life Cycle
Udayakumar Sree
 
Types of software testing
Types of software testingTypes of software testing
Types of software testing
Prachi Sasankar
 

Tendances (20)

Black box & white-box testing technique
Black box & white-box testing techniqueBlack box & white-box testing technique
Black box & white-box testing technique
 
Software Testing or Quality Assurance
Software Testing or Quality AssuranceSoftware Testing or Quality Assurance
Software Testing or Quality Assurance
 
Software testing ppt
Software testing pptSoftware testing ppt
Software testing ppt
 
Se (techniques for black box testing ppt)
Se (techniques for black box testing ppt)Se (techniques for black box testing ppt)
Se (techniques for black box testing ppt)
 
Introduction to software testing
Introduction to software testingIntroduction to software testing
Introduction to software testing
 
White box testing
White box testingWhite box testing
White box testing
 
SOFTWARE TESTING
SOFTWARE TESTINGSOFTWARE TESTING
SOFTWARE TESTING
 
Software Testing - Software Quality
Software Testing - Software QualitySoftware Testing - Software Quality
Software Testing - Software Quality
 
Black box software testing
Black box software testingBlack box software testing
Black box software testing
 
Regression testing
Regression testingRegression testing
Regression testing
 
Basic software-testing-concepts
Basic software-testing-conceptsBasic software-testing-concepts
Basic software-testing-concepts
 
Sanity testing and smoke testing
Sanity testing and smoke testingSanity testing and smoke testing
Sanity testing and smoke testing
 
Software Testing Introduction
Software Testing IntroductionSoftware Testing Introduction
Software Testing Introduction
 
System Testing.pptx
System Testing.pptxSystem Testing.pptx
System Testing.pptx
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
Software Testing Strategies
Software Testing StrategiesSoftware Testing Strategies
Software Testing Strategies
 
Software testing
Software testingSoftware testing
Software testing
 
Software Testing 101
Software Testing 101Software Testing 101
Software Testing 101
 
Software Testing Life Cycle
Software Testing Life CycleSoftware Testing Life Cycle
Software Testing Life Cycle
 
Types of software testing
Types of software testingTypes of software testing
Types of software testing
 

Similaire à Debugging (Part 2)

Debugging Approaches.pptx
Debugging Approaches.pptxDebugging Approaches.pptx
Debugging Approaches.pptx
ubaidullah75790
 
Debugging- bajju.pptx
Debugging- bajju.pptxDebugging- bajju.pptx
Debugging- bajju.pptx
ShivamBajaj36
 
Debbuger
DebbugerDebbuger
Debbuger
ranjitsingh89
 
Debugging.pdf
Debugging.pdfDebugging.pdf
Debugging.pdf
kumari36
 
What is software testing in software engineering?
What is software testing in software engineering?What is software testing in software engineering?
What is software testing in software engineering?
tommychauhan
 
What is Testing in Software Engineering?
What is Testing in Software Engineering?What is Testing in Software Engineering?
What is Testing in Software Engineering?
tommychauhan
 
Prototyping
PrototypingPrototyping
Prototyping
Ifa Laili
 
Overview of Software Engineering Principles - SCPS311.pptx
Overview of Software Engineering Principles - SCPS311.pptxOverview of Software Engineering Principles - SCPS311.pptx
Overview of Software Engineering Principles - SCPS311.pptx
BypassFrp
 
L software testing
L   software testingL   software testing
L software testing
Fáber D. Giraldo
 
Chapter 13 software testing strategies
Chapter 13 software testing strategiesChapter 13 software testing strategies
Chapter 13 software testing strategies
SHREEHARI WADAWADAGI
 
Testing &ampdebugging
Testing &ampdebuggingTesting &ampdebugging
Testing &ampdebugging
rajshreemuthiah
 
Debugging Presentation Rehman Ali.pptx
Debugging Presentation Rehman Ali.pptxDebugging Presentation Rehman Ali.pptx
Debugging Presentation Rehman Ali.pptx
RehmanAli69
 
01. foundamentals of testing
01. foundamentals of testing01. foundamentals of testing
01. foundamentals of testing
Tricia Karina
 
IT Quality Testing and the Defect Management Process
IT Quality Testing and the Defect Management ProcessIT Quality Testing and the Defect Management Process
IT Quality Testing and the Defect Management Process
Yolanda Williams
 
Software engineering 22 error detection and debugging
Software engineering 22 error detection and debuggingSoftware engineering 22 error detection and debugging
Software engineering 22 error detection and debugging
Vaibhav Khanna
 
6. oose testing
6. oose testing6. oose testing
6. oose testing
Ashenafi Workie
 
Top Ten Tips for Tackling Test Automation Webinar Presentation.pptx
Top Ten Tips for Tackling Test Automation Webinar Presentation.pptxTop Ten Tips for Tackling Test Automation Webinar Presentation.pptx
Top Ten Tips for Tackling Test Automation Webinar Presentation.pptx
Inflectra
 
Software unit4
Software unit4Software unit4
Software unit4
Himanshu Awasthi
 
SOFTWARE TESTING UNIT-4
SOFTWARE TESTING UNIT-4  SOFTWARE TESTING UNIT-4
SOFTWARE TESTING UNIT-4
Mohammad Faizan
 
Methodology Patterns (Agile Cambridge 2014)
Methodology Patterns (Agile Cambridge 2014)Methodology Patterns (Agile Cambridge 2014)
Methodology Patterns (Agile Cambridge 2014)
Giovanni Asproni
 

Similaire à Debugging (Part 2) (20)

Debugging Approaches.pptx
Debugging Approaches.pptxDebugging Approaches.pptx
Debugging Approaches.pptx
 
Debugging- bajju.pptx
Debugging- bajju.pptxDebugging- bajju.pptx
Debugging- bajju.pptx
 
Debbuger
DebbugerDebbuger
Debbuger
 
Debugging.pdf
Debugging.pdfDebugging.pdf
Debugging.pdf
 
What is software testing in software engineering?
What is software testing in software engineering?What is software testing in software engineering?
What is software testing in software engineering?
 
What is Testing in Software Engineering?
What is Testing in Software Engineering?What is Testing in Software Engineering?
What is Testing in Software Engineering?
 
Prototyping
PrototypingPrototyping
Prototyping
 
Overview of Software Engineering Principles - SCPS311.pptx
Overview of Software Engineering Principles - SCPS311.pptxOverview of Software Engineering Principles - SCPS311.pptx
Overview of Software Engineering Principles - SCPS311.pptx
 
L software testing
L   software testingL   software testing
L software testing
 
Chapter 13 software testing strategies
Chapter 13 software testing strategiesChapter 13 software testing strategies
Chapter 13 software testing strategies
 
Testing &ampdebugging
Testing &ampdebuggingTesting &ampdebugging
Testing &ampdebugging
 
Debugging Presentation Rehman Ali.pptx
Debugging Presentation Rehman Ali.pptxDebugging Presentation Rehman Ali.pptx
Debugging Presentation Rehman Ali.pptx
 
01. foundamentals of testing
01. foundamentals of testing01. foundamentals of testing
01. foundamentals of testing
 
IT Quality Testing and the Defect Management Process
IT Quality Testing and the Defect Management ProcessIT Quality Testing and the Defect Management Process
IT Quality Testing and the Defect Management Process
 
Software engineering 22 error detection and debugging
Software engineering 22 error detection and debuggingSoftware engineering 22 error detection and debugging
Software engineering 22 error detection and debugging
 
6. oose testing
6. oose testing6. oose testing
6. oose testing
 
Top Ten Tips for Tackling Test Automation Webinar Presentation.pptx
Top Ten Tips for Tackling Test Automation Webinar Presentation.pptxTop Ten Tips for Tackling Test Automation Webinar Presentation.pptx
Top Ten Tips for Tackling Test Automation Webinar Presentation.pptx
 
Software unit4
Software unit4Software unit4
Software unit4
 
SOFTWARE TESTING UNIT-4
SOFTWARE TESTING UNIT-4  SOFTWARE TESTING UNIT-4
SOFTWARE TESTING UNIT-4
 
Methodology Patterns (Agile Cambridge 2014)
Methodology Patterns (Agile Cambridge 2014)Methodology Patterns (Agile Cambridge 2014)
Methodology Patterns (Agile Cambridge 2014)
 

Plus de Ajeng Savitri

Software Testing Documentation
Software Testing DocumentationSoftware Testing Documentation
Software Testing Documentation
Ajeng Savitri
 
Software Productivity Measurement
Software Productivity MeasurementSoftware Productivity Measurement
Software Productivity Measurement
Ajeng Savitri
 
Software Testing Strategy (Part 2)
Software Testing Strategy (Part 2)Software Testing Strategy (Part 2)
Software Testing Strategy (Part 2)
Ajeng Savitri
 
Testing Technique
Testing TechniqueTesting Technique
Testing Technique
Ajeng Savitri
 
Methodology Selection Strategy
Methodology Selection Strategy Methodology Selection Strategy
Methodology Selection Strategy
Ajeng Savitri
 
Computer Evolution and Performance
Computer Evolution and PerformanceComputer Evolution and Performance
Computer Evolution and Performance
Ajeng Savitri
 
Sequence Diagram
Sequence DiagramSequence Diagram
Sequence Diagram
Ajeng Savitri
 
Activity Diagram
Activity DiagramActivity Diagram
Activity Diagram
Ajeng Savitri
 
Use Case Diagram
Use Case DiagramUse Case Diagram
Use Case Diagram
Ajeng Savitri
 
Requirement Gathering
Requirement GatheringRequirement Gathering
Requirement Gathering
Ajeng Savitri
 
Business Value
Business ValueBusiness Value
Business Value
Ajeng Savitri
 
Agile Development
Agile DevelopmentAgile Development
Agile Development
Ajeng Savitri
 
Structured Design
Structured DesignStructured Design
Structured Design
Ajeng Savitri
 
Introduction to SDLC
Introduction to SDLC Introduction to SDLC
Introduction to SDLC
Ajeng Savitri
 
Systems Analyst and Its Roles (2)
Systems Analyst and Its Roles (2)Systems Analyst and Its Roles (2)
Systems Analyst and Its Roles (2)
Ajeng Savitri
 
Systems Analyst and Its Roles
Systems Analyst and Its RolesSystems Analyst and Its Roles
Systems Analyst and Its Roles
Ajeng Savitri
 
Algoritma Branch and Bound
Algoritma Branch and BoundAlgoritma Branch and Bound
Algoritma Branch and Bound
Ajeng Savitri
 
Algoritma Backtracking
Algoritma BacktrackingAlgoritma Backtracking
Algoritma Backtracking
Ajeng Savitri
 
Algoritma Traversal dalam Graf
Algoritma Traversal dalam GrafAlgoritma Traversal dalam Graf
Algoritma Traversal dalam Graf
Ajeng Savitri
 
Algoritma Divide and Conquer (Sorting & Searching)
Algoritma Divide and Conquer (Sorting & Searching)Algoritma Divide and Conquer (Sorting & Searching)
Algoritma Divide and Conquer (Sorting & Searching)
Ajeng Savitri
 

Plus de Ajeng Savitri (20)

Software Testing Documentation
Software Testing DocumentationSoftware Testing Documentation
Software Testing Documentation
 
Software Productivity Measurement
Software Productivity MeasurementSoftware Productivity Measurement
Software Productivity Measurement
 
Software Testing Strategy (Part 2)
Software Testing Strategy (Part 2)Software Testing Strategy (Part 2)
Software Testing Strategy (Part 2)
 
Testing Technique
Testing TechniqueTesting Technique
Testing Technique
 
Methodology Selection Strategy
Methodology Selection Strategy Methodology Selection Strategy
Methodology Selection Strategy
 
Computer Evolution and Performance
Computer Evolution and PerformanceComputer Evolution and Performance
Computer Evolution and Performance
 
Sequence Diagram
Sequence DiagramSequence Diagram
Sequence Diagram
 
Activity Diagram
Activity DiagramActivity Diagram
Activity Diagram
 
Use Case Diagram
Use Case DiagramUse Case Diagram
Use Case Diagram
 
Requirement Gathering
Requirement GatheringRequirement Gathering
Requirement Gathering
 
Business Value
Business ValueBusiness Value
Business Value
 
Agile Development
Agile DevelopmentAgile Development
Agile Development
 
Structured Design
Structured DesignStructured Design
Structured Design
 
Introduction to SDLC
Introduction to SDLC Introduction to SDLC
Introduction to SDLC
 
Systems Analyst and Its Roles (2)
Systems Analyst and Its Roles (2)Systems Analyst and Its Roles (2)
Systems Analyst and Its Roles (2)
 
Systems Analyst and Its Roles
Systems Analyst and Its RolesSystems Analyst and Its Roles
Systems Analyst and Its Roles
 
Algoritma Branch and Bound
Algoritma Branch and BoundAlgoritma Branch and Bound
Algoritma Branch and Bound
 
Algoritma Backtracking
Algoritma BacktrackingAlgoritma Backtracking
Algoritma Backtracking
 
Algoritma Traversal dalam Graf
Algoritma Traversal dalam GrafAlgoritma Traversal dalam Graf
Algoritma Traversal dalam Graf
 
Algoritma Divide and Conquer (Sorting & Searching)
Algoritma Divide and Conquer (Sorting & Searching)Algoritma Divide and Conquer (Sorting & Searching)
Algoritma Divide and Conquer (Sorting & Searching)
 

Dernier

KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
rodomar2
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
Green Software Development
 
UI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design SystemUI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design System
Peter Muessig
 
Mobile app Development Services | Drona Infotech
Mobile app Development Services  | Drona InfotechMobile app Development Services  | Drona Infotech
Mobile app Development Services | Drona Infotech
Drona Infotech
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
SOCRadar
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
kalichargn70th171
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
mz5nrf0n
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
mz5nrf0n
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
 
All you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVMAll you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVM
Alina Yurenko
 
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
dakas1
 
Top 9 Trends in Cybersecurity for 2024.pptx
Top 9 Trends in Cybersecurity for 2024.pptxTop 9 Trends in Cybersecurity for 2024.pptx
Top 9 Trends in Cybersecurity for 2024.pptx
devvsandy
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
Peter Muessig
 
316895207-SAP-Oil-and-Gas-Downstream-Training.pptx
316895207-SAP-Oil-and-Gas-Downstream-Training.pptx316895207-SAP-Oil-and-Gas-Downstream-Training.pptx
316895207-SAP-Oil-and-Gas-Downstream-Training.pptx
ssuserad3af4
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
Remote DBA Services
 

Dernier (20)

KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
 
UI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design SystemUI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design System
 
Mobile app Development Services | Drona Infotech
Mobile app Development Services  | Drona InfotechMobile app Development Services  | Drona Infotech
Mobile app Development Services | Drona Infotech
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
 
All you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVMAll you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVM
 
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
 
Top 9 Trends in Cybersecurity for 2024.pptx
Top 9 Trends in Cybersecurity for 2024.pptxTop 9 Trends in Cybersecurity for 2024.pptx
Top 9 Trends in Cybersecurity for 2024.pptx
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
 
316895207-SAP-Oil-and-Gas-Downstream-Training.pptx
316895207-SAP-Oil-and-Gas-Downstream-Training.pptx316895207-SAP-Oil-and-Gas-Downstream-Training.pptx
316895207-SAP-Oil-and-Gas-Downstream-Training.pptx
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
 

Debugging (Part 2)

  • 1. MEETING 13 DEBUGGING (PART 2) SOFTWARE TESTING By : Ajeng Savitri Puspaningrum, M.Kom
  • 4. 4 The best way to do debugging is to have a systematic way of sneaking up on the problem There are many popular debugging approaches, but the success of any approach is dependent upon the understanding of the program
  • 5. 5 DEBUGGING METHOD • Of the two aspects of debugging, locating the error and correcting it, locating the error represents perhaps 95 percent of the problem. • So there are many techniques to do debugging, such as: • Brute Force Method • Cause Elimination Method • Trial and Error Method • Backtracking and forward tracking • Etc.
  • 7. 7 BRUTE FORCE METHOD • Most common and least efficient for isolating the cause of a software error. • We apply this method when all else fails. • This method obtains and studies a printout of all registers and relevant memory locations. • All dumps should be well documented and retained for possible use on subsequent problems. • It requires little thought and is the least mentally taxing of the methods.
  • 8. 8 BRUTE FORCE METHOD (cont.) • In this approach, memory dumps are taken, run time traces are invoked and the program is loaded with print statements. • When this is done, we may find a clue in the information produced which leads to the identification of the cause of a bug. • Memory traces are similar to memory dumps, except that the printout contains only certain memory and register contents and printing is conditional on some event occurring.
  • 9. 9 BRUTE FORCE METHOD (cont.) • Typically conditional events are entry, exit, or use of one of the following: • A particular subroutine, statement, or database • Communication with I/O devices • Value of a variable • Timed actions (periodic or random) in a certain real-time system. • A special problem with trace programs is that the conditions are entered in the source code and any changes require a recompilation. • A huge amount of data is generated, which, although may help to identify the cause, may be difficult to manage and analyze.
  • 10. 10 CATEGORIES OF BRUTE-FORCE • Brute-force methods can be partitioned into at least three categories: 1. Debugging with a storage dump. 2. Debugging according to the common suggestion to ‘‘scatter print statements throughout your program.’’? 3. Debugging with automated debugging tools.
  • 11. 11 DEBUGGING WITH A STORAGE DUMP • The most inefficient of the brute-force methods because : • Difficult to establish a correspondence between memory locations and the variables in a source program. • With any program of reasonable complexity, such a memory dump will produce a massive amount of data, most of which is irrelevant. • A memory dump is a static picture of the program, showing the state of the program at only one instant in time; to find errors, you have to study the dynamics of a program (state changes over time). • Rarely produced at the exact point of the error, so it doesn’t show the program’s state at the point of the error. Program actions between the time of the dump and the time of the error can mask the clues you need to find the error. • Adequate methodologies don’t exist for finding errors by analyzing a memory dump
  • 12. 12 DEBUGGING ACCORDING TO THE COMMON SUGGESTION • Better than a memory dump because it shows the dynamics of a program and lets you examine information that is easier to relate to the source program. • But this method has many shortcomings, such as: • Rather than encouraging you to think about the problem, it is largely a hit-or-miss method. • It produces a massive amount of data to be analyzed. • It requires you to change the program; such changes can mask the error, alter critical timing relationships, or introduce new errors. • It may work on small programs, but the cost of using it in large programs is quite high. Furthermore, it often is not even feasible on certain types of programs such as operating systems or process control programs.
  • 13. 13 DEBUGGING WITH AUTOMATED DEBUGGING TOOLS • Done by analyzing the dynamics of the program with the debugging features of the programming language or special interactive debugging tools. • A common capability and function of debugging tools are to set breakpoints that cause the program to be suspended when a particular statement is executed or when a particular variable is altered, so it is enabling the programmer to examine the current state of the program.
  • 15. 15 CAUSE ELIMINATION METHOD • Manifested by induction or deduction and also introduces the concept of binary partitioning. • Data related to error occurrence are organized to isolate potential causes. • A cause hypothesis is devised and the 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. • Therefore, we may rule out causes one by one until a single one remains for validation. The cause is identified, properly fixed, and re-tested accordingly.
  • 16. 16 DEBUGGING BY INDUCTION • Done by a move from the particulars of a situation to the whole • Start with the clues (the symptoms of the error and possibly the results of one or more test cases) and look for relationships among the clues
  • 18. 18 THE INDUCTIVE DEBUGGING STEPS The steps are as follows: 1. Locate the pertinent data. 2. Organize the data. 3. Devise a hypothesis. 4. Prove the hypothesis. 5. Fix the problem.
  • 19. 19 DEBUGGING BY DEDUCTION • Proceeds from some general theories or premises, using the processes of elimination and refinement, to arrive at a conclusion (the location of the error) • Start with a set of suspects and, by the process of elimination and refinement, decide that the problem must have done it.
  • 21. 21 THE DEDUCTIVE DEBUGGING STEPS The steps are as follows: 1. Enumerate the possible causes or hypotheses. 2. Use the data to eliminate possible causes. 3. Refine the remaining hypothesis. 4. Prove the remaining hypothesis. 5. Fix the error.
  • 23. 23 TRIAL AND ERROR METHOD • Dependent on the ability and experience of the debugging persons. • Based on experience and intelligence, and also using the ‘hit and trial’ technique, the bug is located and a solution is found. • This is a slow approach and becomes impractical in large programs.
  • 24. 24 BACKTRACKING METHOD • This can be used successfully in small programs. • Start at the point where the program gives an incorrect result such as an unexpected output being printed. • After analyzing the output, we trace backward the source code manually until the cause of the failure is found. • The source code, from the statement where symptoms of the failure are found, to the states where the cause of failure is found, is analyzed properly.
  • 25. 25 BACKTRACKING METHOD (cont.) • Another obvious variation of backtracking is forward tracking, where we use print statements or other means to examine a succession of intermediate results to determine at what point the result first became wrong. • Backtracking and forward tracking approaches may be useful only when the size of the program is small. As the program size increases, it becomes difficult to manage these approaches.
  • 27. 27 ERROR-LOCATING PRINCIPLES • Think • If You Reach an Impasse, Sleep on It • If You Reach an Impasse, Describe the Problem to Someone Else • Use Debugging Tools Only as a Second Resort • Avoid Experimentation—Use It Only as a Last Resort
  • 28. 28 ERROR-REPAIRING PRINCIPLES • Where There Is One Bug, There Is Likely to Be Another • Fix the Error, Not Just a Symptom of It • The Probability of the Fix Being Correct Is Not 100 Percent • The Probability of the Fix Being Correct Drops as the Size of the Program Increases • Beware of the Possibility That an Error Correction Creates a New Error • The Process of Error Repair Should Put You Temporarily Back into the Design Phase • Change the Source Code, Not the Object Code
  • 29. 29 ERROR ANALYSIS A careful analysis might include the following studies: • Where was the error made? • Who made the error? • What was done incorrectly? • How could the error have been prevented? • How could the error have been prevented? • How could the error have been detected earlier? Careful
  • 30. References Chopra, R. (2018). Software Testing: Principles and Practices. Mercury Learning & Information. 02 Majchrzak, T. A. (2012). Improving Software Testing: Technical And Organizational Developments. Springer Science & Business Media. 03 Myers, G. J., Sandler, C., & Badgett, T. (2012). The Art Of Software Testing. John Wiley & Sons. 04 Dooley, J. F., & Dooley. (2017). Software Development, Design and Coding. Apress. 01 Singh, Y. (2011). Software Testing. Cambridge University Press 05
  • 31. THANK YOU Insert the Subtitle of Your Presentation