DEFECT V/S BUG V/S ERROR

QA Talks Community
4 min readJun 24, 2021

“Testing is the process of identifying defects intentionally in order to improve the Quality of Product.”

In this blog, I would like to look at what defines an error, defect, bug, and fault, which I personally think are totally different.

Firstly I want to discuss what the main difference is between a Defect Bug Error or failure. All the issues look similar in manner but there is a very big difference among all of them. Let’s Discuss with Examples:-

{ I am totally confused about whether the error, failure, bug or defect are the same?}

In layman’s Terminology “A mistake in coding is called Error, that error found by the tester is called Defect, defect accepted by development team then it is called Bug.

Following Diagram Demonstrates the concept of Error, Bug, and Failure.

{Error,Defect & Failure}

It can be simply defined as a variance between the expected result and the actual result. It is the deviation of the customer requirement.

What is Error?

An error is a mistake, a misconception on the side of a software developer. In this category of developer, we mainly include software engineers, programmers, analysts.

What is Defect In Software Testing?

As we already discussed above firstly, Defect is a variance between expected results and actual results of execution of a test case on the system.

what is a Bug?

In Software testing, when the expected and actual output is not matching, an incident needs to be raised. If the defect accepted by the development team is known as a bug.

For example, the login module is tested by the tester; and the login module consists of 2 fields one is for Authorization(Email ID) and the other one is for authentication(Password) he/she enters a valid email address and password but it still shows the warning “ invalid email address”. Now the tester reported that defect to the developer and he accepted that the defect/ issue is called a bug.

What is Failure in Software Testing?

It is a condition that causes the software to fail to perform its required function.

For example As per (SRS) Software Requirement specification, there is no need to develop the Favorite module in the application but all requirements are not clear at the end of the developer side and they created a favorite module.

A common example that demonstrates the concept of error, bug, defect, and failure:

//Program Demonstrates the Addition of 2 Numbers

1 #include<stdio.h>

2 Void main ()

3 {

4 int a, b, add;

5 a = 5;

6 b = 3;

7 add = a — b;

8 printf(“The addition of 2 numbers 5 + 3 = %d”, add);

9 } //end of main()

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

The addition of 2 numbers 5 + 3 = 2

So after compiling and running this program, we realize the program has failed to do what it was supposed to do.

The expectation from the program: 5+3 — -> 8

The Actual Output of the Program: 5+3 — ->2

For now, we have detected a failure. As the failure has been detected a defect can be raised. Now, let us go back to the program and analyze what was the fault in the program.

1 #include<stdio.h>

2 Void main ()

3 {

4 int a, b, add;

5 a = 5;

6 b = 3;

7 add = a — b; // — — — -> BUG

8 printf(“The addition of 2 numbers 5 + 3 = %d”, add);

9 } //end of main()

We notice at line number 7, there is a ‘-’ sign present instead of a ‘+’ sign. So the fault in the program is the ‘-’ sign. Line 7 has the fault which caused the program to deviate from the functionality.

Error is the mistake that is made by typing ‘-’ instead of the ‘+’ sign. We have observed failure in the correct execution of the program. And in this case, we can also say we have found the bug.

I hope you enjoyed my article and don’t forget to smash that clap button.

#maketestingeasy #happytesting #qatechtalks #Tester #testing #bug #error

Author: Gandharv Madan

More QA TechTalks blogs here…

Want to be a blogger at QA TechTalks Community? Register below!

Write, share with the QA community, and earn rewards.

--

--

QA Talks Community

Welcome to QA Talks, a community-based startup that's mainly focused on QA blogs & talks — https://www.tech-talks.info/