SlideShare a Scribd company logo
1 of 31
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

More Related Content

What's hot

Software Testing 101
Software Testing 101Software Testing 101
Software Testing 101QA Hannah
 
Software Testing Introduction
Software Testing IntroductionSoftware Testing Introduction
Software Testing IntroductionArunKumar5524
 
Testing object oriented software.pptx
Testing object oriented software.pptxTesting object oriented software.pptx
Testing object oriented software.pptxDRPOONAMDRPOONAM1
 
Software Testing Fundamentals
Software Testing FundamentalsSoftware Testing Fundamentals
Software Testing FundamentalsChankey Pathak
 
Manual testing concepts course 1
Manual testing concepts course 1Manual testing concepts course 1
Manual testing concepts course 1Raghu Kiran
 
Software Testing Basics
Software Testing BasicsSoftware Testing Basics
Software Testing BasicsBelal Raslan
 
Testing concepts [3] - Software Testing Techniques (CIS640)
Testing concepts [3] - Software Testing Techniques (CIS640)Testing concepts [3] - Software Testing Techniques (CIS640)
Testing concepts [3] - Software Testing Techniques (CIS640)Venkatesh Prasad Ranganath
 
Tecnica de Prueba de Software
Tecnica de Prueba de SoftwareTecnica de Prueba de Software
Tecnica de Prueba de Softwarejose_torres123
 
New software testing-techniques
New software testing-techniquesNew software testing-techniques
New software testing-techniquesFincy V.J
 
Software reliability
Software reliabilitySoftware reliability
Software reliabilityAnand Kumar
 
Manual software-testing-interview-questions-with-answers
Manual software-testing-interview-questions-with-answersManual software-testing-interview-questions-with-answers
Manual software-testing-interview-questions-with-answersSachin Gupta
 
Basic software-testing-concepts
Basic software-testing-conceptsBasic software-testing-concepts
Basic software-testing-conceptsmedsherb
 
Strategies For Software Test Documentation
Strategies For Software Test Documentation Strategies For Software Test Documentation
Strategies For Software Test Documentation Vishwak Solution
 
Software Testing Life Cycle
Software Testing Life CycleSoftware Testing Life Cycle
Software Testing Life CycleUdayakumar Sree
 
Testing, black ,white and gray box testing
Testing, black ,white and gray box testingTesting, black ,white and gray box testing
Testing, black ,white and gray box testingAamir Shakir
 
Software Reliability
Software ReliabilitySoftware Reliability
Software Reliabilityranapoonam1
 

What's hot (20)

Testing fundamentals
Testing fundamentalsTesting fundamentals
Testing fundamentals
 
Software Testing 101
Software Testing 101Software Testing 101
Software Testing 101
 
Software Testing Introduction
Software Testing IntroductionSoftware Testing Introduction
Software Testing Introduction
 
Testing object oriented software.pptx
Testing object oriented software.pptxTesting object oriented software.pptx
Testing object oriented software.pptx
 
İyi Bir Test Uzmanı Olmak İçin...
İyi Bir Test Uzmanı Olmak İçin...İyi Bir Test Uzmanı Olmak İçin...
İyi Bir Test Uzmanı Olmak İçin...
 
Software Testing Fundamentals
Software Testing FundamentalsSoftware Testing Fundamentals
Software Testing Fundamentals
 
Manual testing concepts course 1
Manual testing concepts course 1Manual testing concepts course 1
Manual testing concepts course 1
 
Software Testing Basics
Software Testing BasicsSoftware Testing Basics
Software Testing Basics
 
Softwaretesting
SoftwaretestingSoftwaretesting
Softwaretesting
 
Testing concepts [3] - Software Testing Techniques (CIS640)
Testing concepts [3] - Software Testing Techniques (CIS640)Testing concepts [3] - Software Testing Techniques (CIS640)
Testing concepts [3] - Software Testing Techniques (CIS640)
 
Tecnica de Prueba de Software
Tecnica de Prueba de SoftwareTecnica de Prueba de Software
Tecnica de Prueba de Software
 
Chapter 1 - Basic Concepts
Chapter 1 - Basic ConceptsChapter 1 - Basic Concepts
Chapter 1 - Basic Concepts
 
New software testing-techniques
New software testing-techniquesNew software testing-techniques
New software testing-techniques
 
Software reliability
Software reliabilitySoftware reliability
Software reliability
 
Manual software-testing-interview-questions-with-answers
Manual software-testing-interview-questions-with-answersManual software-testing-interview-questions-with-answers
Manual software-testing-interview-questions-with-answers
 
Basic software-testing-concepts
Basic software-testing-conceptsBasic software-testing-concepts
Basic software-testing-concepts
 
Strategies For Software Test Documentation
Strategies For Software Test Documentation Strategies For Software Test Documentation
Strategies For Software Test Documentation
 
Software Testing Life Cycle
Software Testing Life CycleSoftware Testing Life Cycle
Software Testing Life Cycle
 
Testing, black ,white and gray box testing
Testing, black ,white and gray box testingTesting, black ,white and gray box testing
Testing, black ,white and gray box testing
 
Software Reliability
Software ReliabilitySoftware Reliability
Software Reliability
 

Similar to Debugging (Part 2)

Debugging Approaches.pptx
Debugging Approaches.pptxDebugging Approaches.pptx
Debugging Approaches.pptxubaidullah75790
 
Debugging- bajju.pptx
Debugging- bajju.pptxDebugging- bajju.pptx
Debugging- bajju.pptxShivamBajaj36
 
Debugging.pdf
Debugging.pdfDebugging.pdf
Debugging.pdfkumari36
 
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.pptxBypassFrp
 
Chapter 13 software testing strategies
Chapter 13 software testing strategiesChapter 13 software testing strategies
Chapter 13 software testing strategiesSHREEHARI WADAWADAGI
 
Debugging Presentation Rehman Ali.pptx
Debugging Presentation Rehman Ali.pptxDebugging Presentation Rehman Ali.pptx
Debugging Presentation Rehman Ali.pptxRehmanAli69
 
01. foundamentals of testing
01. foundamentals of testing01. foundamentals of testing
01. foundamentals of testingTricia 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 ProcessYolanda 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 debuggingVaibhav Khanna
 
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.pptxInflectra
 
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
 

Similar to 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
 
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 TESTING UNIT-4
SOFTWARE TESTING UNIT-4  SOFTWARE TESTING UNIT-4
SOFTWARE TESTING UNIT-4
 
Software unit4
Software unit4Software unit4
Software unit4
 
Methodology Patterns (Agile Cambridge 2014)
Methodology Patterns (Agile Cambridge 2014)Methodology Patterns (Agile Cambridge 2014)
Methodology Patterns (Agile Cambridge 2014)
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
Hello
HelloHello
Hello
 

More from Ajeng Savitri

Software Testing Documentation
Software Testing DocumentationSoftware Testing Documentation
Software Testing DocumentationAjeng Savitri
 
Software Productivity Measurement
Software Productivity MeasurementSoftware Productivity Measurement
Software Productivity MeasurementAjeng Savitri
 
Software Testing Strategy (Part 2)
Software Testing Strategy (Part 2)Software Testing Strategy (Part 2)
Software Testing Strategy (Part 2)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 PerformanceAjeng Savitri
 
Requirement Gathering
Requirement GatheringRequirement Gathering
Requirement GatheringAjeng 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 RolesAjeng Savitri
 
Algoritma Branch and Bound
Algoritma Branch and BoundAlgoritma Branch and Bound
Algoritma Branch and BoundAjeng Savitri
 
Algoritma Backtracking
Algoritma BacktrackingAlgoritma Backtracking
Algoritma BacktrackingAjeng Savitri
 
Algoritma Traversal dalam Graf
Algoritma Traversal dalam GrafAlgoritma Traversal dalam Graf
Algoritma Traversal dalam GrafAjeng 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
 

More from 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)
 

Recently uploaded

What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?Watsoo Telematics
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 

Recently uploaded (20)

Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 

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