UNIT-4 Software Testing and Maintenance
UNIT-4 Software Testing and Maintenance
UNIT-4 Software Testing and Maintenance
Software Testing
and Maintenance
Software Testing
• Make judgement about quality or acceptability and
to discover problems
• Test
Testing is obviously concerned with errors, faults,
failures, and incidents.
A test is the act of exercising software with test cases.
A test has two distinct goals: to find failures
or to demonstrate correct execution.
• Test case
A test case has an identity and is associated with a
program behaviour. It also has a set of inputs
and expected outputs.
Why should We Test ?
• Debugging Strategies
objective— to find and correct the cause of a software error or
defect
Bradley describes the debugging approach in this way: Debugging
is a straightforward application of the scientific method that has
been developed over 2,500 years. The basis of debugging is to
locate the problem’s source [the cause] by binary partitioning,
through working hypotheses that predict new values to be
examined
Three debugging strategies have been proposed [Mye79]:
(1) brute force, (2) backtracking, and (3) cause elimination
• The brute force category of debugging is probably the
most common and least efficient method for isolating
the cause of a software error. You apply brute force
debugging methods when all else fails
• Backtracking is a fairly common debugging approach that
can be used successfully in small programs. Beginning at
the site where a symptom has been uncovered, the
source code is traced backward (manually) until the
cause is found
• Cause elimination—is manifested by induction or
deduction and introduces the concept of binary
partitioning
• Automated debugging
Each of these debugging approaches can be
supplemented with debugging tools that can provide
you with semiautomated support as debugging
strategies are
• Correcting the Error attempted
Three simple questions that you should ask before
making the “correction” that removes the cause of a
bug
1. Is the cause of the bug reproduced in another part of
the program?
2. What “next bug” might be introduced by the fix I’m
about to make?
3. What could we have done to prevent this bug in the
first place?