Software Engineering | Differences between defect, bug and failure

Generally, when the system/application does not act as per expectation or abnormally, we call it’s an error or it’s an fault and so on. Many of the newbies in Software Testing industry have confusion in using this, so let’s know what is the difference b/w defect, bug, error and failure. We will see these terms in detail one by one.

  1. Defect:

    The bugs introduced by programmer inside the code is called as Defect.

    Defect is defined as the deviation from the actual and expected result of application or software or in other words, defects are defined as any deviation or irregularity from the specifications mentioned in the product functional specification document. Defect is also solved by the developer in development phase or stage.

    Reasons for Defects:

    • Any deviation from the customer requirements is called as defect.
    • By giving wrong input may lead to defect.
    • Any error in logic code may lead to defect.

  2. Bug:
    Sometimes most people are confused between defect and bug, they say that bug is the informal name of defect. Actually bugs are faults in system or application which impact on software functionality and performance. Usually bugs are found in unit testing by testers.

    There are different types of bugs, some of them are given below.

    • Functional Errors
    • Compilation Errors
    • Missing commands
    • Run time Errors
    • Logical errors
    • Inappropriate error handling

    Above given these errors lead to bug.


  3. Failure:

    When a defect reaches the end customer, it is called as Failure.

    Once the product is completed and it is delivered to the customers and if the customer find any issues in product or software then it is the condition of failure of product.
    In other words, if an end user finds an issue in product then that particular issue is called as failure.

    Causes of Failure:

    • Human errors or mistakes may lead to failure.
    • Environmental conditions
    • The way in which system is used.


Flow of Bug to Defect:

Example:
Let’s see a defect by an example.

a=7
b=5
ans=a*b
print("Addition of {} and {} = {}.".format(a, b, ans)) 

When you compile and run this program you see the printed statement as below:

Addition of 7 and 5=35 

This is program of adding two numbers but the output is deviated from it’s actual result which is 12. Now we have detected a failure. As the failure has been detected a defect can be raised.



My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



Improved By : evana, pp_pankaj



Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.