Software Testing Lecture Notes
Software Testing Lecture Notes
Introduction
• Software testing is the process of verifying that software meets specified
requirements and works as intended.
• The primary objective of software testing is to identify defects or errors
that might have been introduced during the development process.
• This can help in improving the quality and reliability of the software and
minimizing the risk of failure.
Types of Software Testing
• Code coverage testing is a type of structural testing that tests the code
coverage of the software to identify areas of code that have not been
executed during testing.
• It helps in improving the overall code quality and reducing the risk of
defects.
• Example: A code coverage test for a software application would involve
measuring the percentage of code that has been executed during testing.
Mutation Testing
• Mutation testing is a type of structural testing that tests the ability of the
software to detect and respond to changes in input.
• It helps in improving the overall fault tolerance and reliability of the
software.
• Example: A mutation test for a flight reservation system would involve
injecting faults or errors into the input data to verify that the system can
handle them.
Case Study 1: Therac-25 Radiation Therapy
Machine
• In the 1980s, the Therac-25 radiation therapy machine was involved in several accidents
that caused serious injuries and deaths.
• The cause of the accidents was traced to a software error that caused the machine to
deliver excessive radiation doses to patients.
• The software had not been adequately tested and validated, and the system did not have
proper safety mechanisms in place.
• The case study highlights the importance of rigorous software testing and the need for
safety-critical systems to have robust testing and validation processes in place.
Case Study 2: Ariane 5 Rocket
• In 1996, the Ariane 5 rocket exploded shortly after liftoff, resulting in the loss of the
rocket and its cargo.
• The cause of the failure was traced to a software error in the rocket's guidance system,
which was not designed to handle the high velocity of the rocket.
• The error was caused by the reuse of software from the Ariane 4 rocket, which had a
different flight profile and did not experience the same velocity.
• The case study highlights the importance of designing software systems that are
appropriate for their intended use and the need for careful consideration of software
reuse.
Best Practices for Software Testing