Have you ever wondered what is the difference between error, fault, bug, defect and failure? All these terms seem highly confusing and interchangeable, whereas they are distinct and used in different contexts. In this blog post, I will explain what is the difference between error, fault, bug, defect and failure.
Example: The software will allow a user to make online payments using a debit card.
Defect: The option of selecting a debit card for making payments is missing.
ERROR: An error is a mistake or omission by a software developer. Programming errors may be logical errors, syntax errors or semantic errors.
BUG: A bug is an error or a fault in a software program which causes it to produce unexpected results. Bug is typically used in terminology of software engineers or software developers. Bugs are usually observed and reported by software testers to the programmers, who eventually fix those bugs. The process of identifying and fixing the cause of bug is called software debugging.
Example: Common example of a bug is application crash.
FAILURE: Failure is the opposite of success, which is the state of a software program of not performing its required functions within specified performance constraints. Software failures are typically observed by the user, which may arise due to wrong input or some virus. A software may recover from a failure state by system reboot.
Example: An example of a failure is Blue Screen of Death in Windows OS.
FAULT: An incorrect step or definition in a software program which causes the program to fail. A fault is introduced into the software as the result of an error (such as a typo). A fault is the result of an error which generates a failure.
Example: An example of a fault is missing semi-colon.
EXAMPLE
This code snippet returns the product of the 'param' multiplied by 2.
1. int multiplyby2 (int number) {
2. int result;
3. result = number * number;
4. return result;
5. }
Output: A call to multiplyby2(3) returns 9, but it should return 6.
- Observing the result 9 is a failure.
- Failure occurred due to the fault on line 3 ("number" instead of "2").
- The fault is due to typo error (someone typed "number" instead of "2" by mistake).
These three different labels are used for a Bug to precisely communicate the problem.
Comments
Post a Comment