Failure occurs when a system or component is unable to perform its function as per its requirements. Not all defects that are present in the software result in failures. There are certain defects that remain as a part of dead code and never get executed.
Definition of Failure
In simple terms, in some situations when a defect that is present in the system and the software gets executed it may lead to the production of a wrong result that causes failure in the software.
Failures need not always be the result of undetected defects or unresolved bugs.
Failures can also happen due to environmental failures, human error.
In some special cases there could be someone who is trying deliberately trying to create a failure in the system for various reasons that are unknown to testers. Let us discuss a few of these causes and reasons.
A Few Causes and Reasons for Failure
- Failures can also happen due to environmental conditions like strong electronic or magnetic field, radiation burst or pollution that can result in faults in hardware or firmware. So, it is important to ensure that the right testing environment is used to maintain high quality and timely delivery of the software. In software environment conditions like running out of disk space, memory etc could lead to failure.
- Failure can be caused by mistakes in the software specification, design or implementation.
- Failures may be arising due to error in the way the system is used. This may be due to few reasons:
- The developer may not have developed the application correctly due to poor understanding of the feature.
- The tester has insufficient knowledge of the application and so testing the application results in failures.
- Mistake by the analyst in the requirement specification or the design specification which goes undetected during reviews.
- Failures can also be the potential consequences caused by errors found in the earlier stages.
- Sometimes, failures are also caused by intentional damages.
Difference between Error, Defect and Failure
- Error: Error is a deviation of the computed or observed value from the theoretically correct value. Errors occur due to the mistakes made by people.Example: If the programmer is not sure about the correct formula to calculate a value or has made a mistake in syntax then it is called an error.
- Failure: Failure occurs when the system is not able to perform its regular functions within the specific performance requirements.Example: When you use a compass in a magnetic field, it will not show the correct direction causing failure of the experiment. If a defect is found by the end user, then that is also an example of a failure.
- Defect: A defect is actually an error that occurs in logic or coding that causes deviation from actual result or produces incorrect results.
Examples of Failure
Let us a look at some very famous failures that occurred in software:
- Microsoft Zune Crash on New Year Eve
Thousands of Microsoft 30 gigabyte Zune media players stopped working suddenly on New Year Eve in 2008 due to problems with their internal clock. Error messages asking for references to “Y2K for Zunes” were displayed to users when they tried to start the device.
- GE Energy NorthEast Blackout
A programming error in GE’s XA/21 system caused data monitoring and alarm failures and resulted in the Northeast Blackout in February 2012. The failure happened when multiple systems tried to access the same information at once and got something similar to busy signals.The software should have given importance to one system at a time. The electrical system condition started degrading as data that should have been deleted was retained. This resulted in slow performance. Backup systems were also affected.
- Aegis cruiser USS Yorktown Incident
In September 1997, the Aegis cruiser USS Yorktown remained dead in the water for many hours due to computer failure caused by an engineering LAN casualty. The systems admin entered bad data into the ship’s Remote Database Manager.The software tried to divide by zero causing a buffer overflow that resulted in the crashing of many computers on the LAN. Thus, the Aegis cruiser lost control of its propulsion system.
In this article, we discussed the concept of failure in the context of software testing. Understanding failures is important to improve the application quickly and accurately at minimal risk.