文档介绍:Object-Oriented Software EngineeringPractical Software Development using UML and Java
Chapter 10:
Testing and Inspecting to Ensure High Quality
© Lethbridge/Laganière 2001
1
Chapter 10: Testing and Inspecting for High Quality
Basic definitions
A failure is an eptable behaviour exhibited by a system
The frequency of failures measures the reliability
An important design objective is to achieve a very low failure rate and hence high reliability.
A failure can result from a violation of an explicit or implicit requirement
A defect is a flaw in any aspect of the system that contributes, or may potentially contribute, to the occurrence of one or more failures
It might take several defects to cause a particular failure
An error is a slip-up or inappropriate decision by a software developer that leads to the introduction of a defect
© Lethbridge/Laganière 2001
2
Chapter 10: Testing and Inspecting for High Quality
Effective and Efficient Testing
To test effectively, you must use a strategy that uncovers as many defects as possible.
To test efficiently, you must find the largest possible number of defects using the fewest possible tests
Testing is like detective work:
The tester must try to understand how programmers and designers think, so as to better find defects.
The tester must not leave anything uncovered, and must be suspicious of everything.
It does not pay to take an excessive amount of time; tester has to be efficient.
© Lethbridge/Laganière 2001
3
Chapter 10: Testing and Inspecting for High Quality
Black-box testing
Testers provide the system with inputs and observe the outputs
They can see none of:
The source code
The internal data
Any of the design documentation describing the system’s internals
© Lethbridge/Laganière 2001
4
Chapter 10: Testing and Inspecting for High Quality
Glass-box testing
Also called ‘white-box’ or ‘structural’ testing
Testers have access to the system design
They can
Examine the design documents