Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 10: esting and Inspecting to Ensure High Quality www.oseng.com
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 10: Testing and Inspecting to Ensure High Quality
10.1 Basic definitions A failure is an unacceptable 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 lt 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 www.oseng.cor C Lethbridge/Laganiere 2001 Chapter 10: Testing and Inspecting for High Quality 2
© Lethbridge/Laganière 2001 Chapter 10: Testing and Inspecting for High Quality 2 10.1 Basic definitions • A failure is an unacceptable 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
10.2 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 - lt does not pay to take an excessive amount of time tester has to be efficient www.oseng.com C Lethbridge/Laganiere 2001 Chapter 10: Testing and Inspecting for High Quality
© Lethbridge/Laganière 2001 Chapter 10: Testing and Inspecting for High Quality 3 10.2 Effective and Efficient Testing To test ef ectively, you must use a strategy that uncovers as many defects as possible. To test ef iciently, 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 ef icient
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 www.oseng.com C Lethbridge/Laganiere 2001 Chapter 10: Testing and Inspecting for High Quality
© Lethbridge/Laganière 2001 Chapter 10: Testing and Inspecting for High Quality 4 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
Glass-box testing Also called‘ white-box’or‘ structural? testing Testers have access to the system design They can Examine the design documents -View the code -Observe at run time the steps taken by algorithms and their internal data Individual programmers often informally employ glass box testing to verify their own code www.oseng.com C Lethbridge/Laganiere 2001 Chapter 10: Testing and Inspecting for High Quality 5
© Lethbridge/Laganière 2001 Chapter 10: Testing and Inspecting for High Quality 5 Glass-box testing Also called ‘white-box’ or ‘structural’ testing Testers have access to the system design • They can —Examine the design documents —View the code —Observe at run time the steps taken by algorithms and their internal data • Individual programmers often informally employ glass- box testing to verify their own code