This chapter presents the following content: Basic definitions, effective and efficient testing, defects in ordinary algorithms, defects in numerical algorithms, defects in timing and co-ordination: deadlocks, livelocks and critical races, defects in handling stress and unusual situations, documentation defects, writing formal test cases and test plans,. | Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 10: Testing and Inspecting to Ensure High Quality 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 could be in the requirements, the design and the code 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 2005 Effective and Efficient Testing To test effectively, you must use a strategy that uncovers as many defects as possible. To test efficiently, . | Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 10: Testing and Inspecting to Ensure High Quality 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 could be in the requirements, the design and the code 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 2005 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 2005 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 © Lethbridge/Laganière 2005 Flow graph for glass-box testing To help the programmer to systematically test the code Each branch in the code (such as if and while statements) creates a node in the graph The testing strategy has to reach a targeted coverage of