Debugging by Deduction: Anum Bakhtiar
Debugging by Deduction: Anum Bakhtiar
DEDUCTION
PRESENTED BY
ANUM BAKHTIAR
Presentation Outline
-Bug
-Life cycle of bug
-Debugging
-The Debugging Process
- Difference between Testing & Debugging
- Methods of Debugging
-
Bug
What is a BUG ?
A fault in a program, which causes the program to perform in unexpected manner.
A program that contains a large number of bugs, and/or bugs that seriously interfere
with its functionality, is said to be buggy.
Reports detailing bugs in a program are commonly known as bug reports, fault
reports, problem reports, trouble reports, defect reports etc.
Why BUG Occurs
There are so many reasons that can cause a bug
Code errors
Unfinished requirements
Misunderstanding of user needs
Requirements that are not detailed enough
Logic errors in the design documents
Lack of documentation
Not enough sufficient testing
Bug Lifecycle
In software development
process, the bug has a life
cycle. The bug should go
through the life cycle to be
closed. A specific life cycle
ensures that the process is
standardized.
The
bug
attains different states in the
life cycle.
Debugging
Debugging is that activity which is performed after executing a successful test case.
Remember that a successful test case is one that shows that a program does not do
what it was designed to do.
Debugging consists of determining the exact nature and location of the suspected
error and fixing the error.
Process of finding the location of an error, given a suspicion that an error exists, based
on the results of a successful test case.
Debugging
Debugging occurs as a consequence of successful testing. That is, when a test case
uncovers an error, debugging is an action that results in the removal of the error.
Debugging is a two-step process that begins when you find an error as a result of a
successful test case.
Step 1 is the determination of the exact nature and location of the suspected error
within the program.
Step 2 consists of fixing the error.
Methods of Debugging
Debugging by Deduction
4. Debugging by Backtracking
5. Debugging by Testing
Debugging by Deduction
The process of 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). See the Figure
Debugging by Deduction
1.
Enumerate the possible causes.
The first step is to develop a list of all conceivable causes of the error. They dont have
to be complete explanations; they are merely theories to help you structure and
analyze the available data.
2. Use the data to eliminate possible causes.
Carefully examine all of the data, particularly by looking for contradictions, and
try to eliminate all but one of the possible causes. If all are eliminated, you need
more data through additional test cases to devise new theories.
3. Refine the remaining hypothesis.
The possible cause at this point might be correct, but it is unlikely to be specific
enough to pinpoint the error. Hence, the next step is to use the available clues to
refine the theory.
Debugging by Deduction
4.
5.
usually
fix the
succeed in
steps 3
REFERNCES
http://www.ianswer4u.com/2012/06/testingand-debugging.html#ixzz3bhUhlvPw
http://www.jodypaul.com/SWE/TD/TestDebu
g.html
http://mrbool.com/what-is-testing-anddebugging-strategy/29914#ixzz3bVJ8mtbI
Any question