SlideShare a Scribd company 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

More Related Content

What's hot

Code coverage
Code coverageCode coverage
Code coverage
Return on Intelligence
 
Software testing
Software testingSoftware testing
Software testing
ssusere50573
 
Quality Assurance in SDLC
Quality Assurance in SDLCQuality Assurance in SDLC
Quality Assurance in SDLC
Adil Mughal
 
API Testing With Katalon Studio
API Testing With Katalon StudioAPI Testing With Katalon Studio
API Testing With Katalon Studio
Knoldus Inc.
 
Introduction to software testing
Introduction to software testingIntroduction to software testing
Introduction to software testing
Hadi Fadlallah
 
Strategies For Software Test Documentation
Strategies For Software Test Documentation Strategies For Software Test Documentation
Strategies For Software Test Documentation
Vishwak Solution
 
Introduction to testing with MSTest, Visual Studio, and Team Foundation Serve...
Introduction to testing with MSTest, Visual Studio, and Team Foundation Serve...Introduction to testing with MSTest, Visual Studio, and Team Foundation Serve...
Introduction to testing with MSTest, Visual Studio, and Team Foundation Serve...
Thomas Weller
 
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
 
Software Testing Basics
Software Testing BasicsSoftware Testing Basics
Software Testing Basics
Belal Raslan
 
Lesson 4...Bug Life Cycle
Lesson 4...Bug Life CycleLesson 4...Bug Life Cycle
Lesson 4...Bug Life Cycle
bhushan Nehete
 
Performance and load testing
Performance and load testingPerformance and load testing
Performance and load testingsonukalpana
 
Summer of Fuzz: macOS
Summer of Fuzz: macOSSummer of Fuzz: macOS
Summer of Fuzz: macOS
Jeremy Brown
 
Software testing
Software testingSoftware testing
Software testing
mkn3009
 
Defect Density matrix SQA
Defect Density  matrix   SQADefect Density  matrix   SQA
Defect Density matrix SQA
Hashim Ali
 
Unit testing & TDD concepts with best practice guidelines.
Unit testing & TDD concepts with best practice guidelines.Unit testing & TDD concepts with best practice guidelines.
Unit testing & TDD concepts with best practice guidelines.
Mohamed Taman
 
SOFTWARE TESTING
SOFTWARE TESTINGSOFTWARE TESTING
SOFTWARE TESTING
Raju Raaj
 
Getting Started With Cypress
Getting Started With CypressGetting Started With Cypress
Getting Started With Cypress
Knoldus Inc.
 
Software Quality Assurance
Software Quality AssuranceSoftware Quality Assurance
Software Quality Assurance
Saqib Raza
 
Sonar qube
Sonar qubeSonar qube
Sonar qube
penetration Tester
 
An Introduction to Unit Testing
An Introduction to Unit TestingAn Introduction to Unit Testing
An Introduction to Unit Testing
Joe Tremblay
 

What's hot (20)

Code coverage
Code coverageCode coverage
Code coverage
 
Software testing
Software testingSoftware testing
Software testing
 
Quality Assurance in SDLC
Quality Assurance in SDLCQuality Assurance in SDLC
Quality Assurance in SDLC
 
API Testing With Katalon Studio
API Testing With Katalon StudioAPI Testing With Katalon Studio
API Testing With Katalon Studio
 
Introduction to software testing
Introduction to software testingIntroduction to software testing
Introduction to software testing
 
Strategies For Software Test Documentation
Strategies For Software Test Documentation Strategies For Software Test Documentation
Strategies For Software Test Documentation
 
Introduction to testing with MSTest, Visual Studio, and Team Foundation Serve...
Introduction to testing with MSTest, Visual Studio, and Team Foundation Serve...Introduction to testing with MSTest, Visual Studio, and Team Foundation Serve...
Introduction to testing with MSTest, Visual Studio, and Team Foundation Serve...
 
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)
 
Software Testing Basics
Software Testing BasicsSoftware Testing Basics
Software Testing Basics
 
Lesson 4...Bug Life Cycle
Lesson 4...Bug Life CycleLesson 4...Bug Life Cycle
Lesson 4...Bug Life Cycle
 
Performance and load testing
Performance and load testingPerformance and load testing
Performance and load testing
 
Summer of Fuzz: macOS
Summer of Fuzz: macOSSummer of Fuzz: macOS
Summer of Fuzz: macOS
 
Software testing
Software testingSoftware testing
Software testing
 
Defect Density matrix SQA
Defect Density  matrix   SQADefect Density  matrix   SQA
Defect Density matrix SQA
 
Unit testing & TDD concepts with best practice guidelines.
Unit testing & TDD concepts with best practice guidelines.Unit testing & TDD concepts with best practice guidelines.
Unit testing & TDD concepts with best practice guidelines.
 
SOFTWARE TESTING
SOFTWARE TESTINGSOFTWARE TESTING
SOFTWARE TESTING
 
Getting Started With Cypress
Getting Started With CypressGetting Started With Cypress
Getting Started With Cypress
 
Software Quality Assurance
Software Quality AssuranceSoftware Quality Assurance
Software Quality Assurance
 
Sonar qube
Sonar qubeSonar qube
Sonar qube
 
An Introduction to Unit Testing
An Introduction to Unit TestingAn Introduction to Unit Testing
An Introduction to Unit Testing
 

Similar to 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
 
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
 
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
 
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
 
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
 

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

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

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

Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 

Recently uploaded (20)

Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 

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