210 likes | 431 Views
SWE 205 - Introduction to Software Engineering. Lecture 28 – Introduction to Software Testing. Lecture Outline. Software testing motivation. What is a software testing? Why software fail? What is cost of software failures? What makes a good software tester?. Software Testing Motivation .
E N D
SWE 205 - Introduction to Software Engineering Lecture 28 – Introduction to Software Testing
Lecture Outline • Software testing motivation. • What is a software testing? • Why software fail? • What is cost of software failures? • What makes a good software tester?
Software Testing Motivation • The Lion King Animated Storybook • Disney’s first multimedia CD-ROM game for kids. Released at Christmas season. • 26th December….. Customer Support’s Nightmare. • The CD was testing only for specific PC platform. • It failed on many popular PC operating system.
Software Testing Motivation • Intel Pentium Floating-Point Bug • (4195835/3145727)* 3145727 - 4195835 • If answer is ZERO, your computer is fine. • Anything else, you have old Intel Pentium CPU with floating-point division bug. • A software bug burned into a computer chip and reproduced over and over in the manufacturing process.
Software Testing Motivation • NASA Mars Polar Lander, 1999 • 3rd December 1999, Mars Polar Lander disappeared during its landing attempt. • Failure Review Board concludes the likely failure reason was the unexpected setting of a single data bit. • Most alarming was why the problem was not caught by internal tests.
Software Testing Motivation • Malaysia Airlines Jetliner, August 2005 • Flight between Perth, Australia and Kuala Lampur, Malaysia zoomed 3,000 feet upwards. • A defective software program had provided incorrect data about the aircraft’s speed and acceleration, confusing flight computers.
What is Software Testing? • The process of finding evidence of defects in software systems. • Establishing confidence that a program does what it is supposed to do. Software testing is not debugging. Software testing is not quality assurance
Software Testing Vs Quality Assurance (QA) • Testing is necessary but not enough for QA process. • Testing contributes to improve quality by helping to identify problems. • QA sets standards that project members (including testers) should follow in order to build a better software.
What is Software Testing? • Correctness of software with respect to requirements or intent; • Performance of software under various conditions; • Robustness of software, its ability to handle erroneous input and unanticipated conditions; • Installation and other facets of a software release.
Basic Definitions • Failure • There is a deviation of the observed behavior of a program or a system from its specification. • Fault • An incorrect step, process or data definition. • Error • Difference between computed, observed or measured value and the true or theoretically correct value or condition.
Trivial Example Failure • For any integer n, square (n) = n*n. int square (int x) { return x*2; } Square (3) = 6 Fault
Trivial Example Correct Result • For any integer n, square (n) = n*n. int square (int x) { return x*2; } Square (2) = 4
Important Considerations • Detect system failures by choosing test inputs carefully. • Determine the faults leading to the failures detected. • Repair the faults leading to the failures detected; and • Re-test the module/system.
Root Causes of Failures • Inaccurate understanding of end user requirements. • Inability to deal with changing requirements. • Late discovery of serious project flaws. • For example, modules that do not fit together. • Untrustworthy build & release process. • Implementation team’s chaos.
Failure Costs Disney’s Lion King CD
Software Testers • Good understanding of the development process and its products. • Ability to anticipate likely faults and errors.
Semantics of programs • Squeeze Function • Semantics of C are such that integers and characters are somewhat interchangeable. • Fibonacci Function • Input Domain - set of values of type ‘int’. • Input domain can vary on different types of machines.
Semantics of programs • These examples are deterministic in nature. • A unique output. • Different methods required for non-deterministic programs. • Similarly, programs may terminate or not terminate.
Key Points • Software testing is the process of discovering evidence of defects and failures in software systems. • Test early, test often, test enough. • Testers should have good understanding of the development process, product.
Announcements • Quiz # 4 • Wednesday 24/12/2008.