11

I am wondering, in software development testing, what is the difference between a bug and a defect?

  • @user246 has it. There is also the issue. Same thing again. – Bookeater Jun 22 '16 at 21:02
  • This has been asked before, so I wanted to share this question. programmers.stackexchange.com/questions/37029/… There are also linked questions (on the right side of this question) that are similar as well. This, cannot be flagged as a duplicate since it's not on SQA SE. – XaolingBao Jun 23 '16 at 1:33
  • I think we have enough answers to this trivial question, so I'm going to protect it now. – user246 Jun 29 '16 at 13:13
  • @user246 Lol what a condescending comment. – Robben Jul 1 '16 at 17:08

12 Answers 12

16

Same thing. No doubt there are companies that use those terms to mean different things, but their usage is not universal. If someone asks you that question in an interview, you should be able to say, "Where I work, the terms are interchangeable. Do they mean something different here?"

8

Bug, Defect, Issue, Fault, Incident, Ticket are all the same and are interchangeably used in organisations. People can debate and say they agree or disagree and quote references but the ground reality is, it does not matter what you call it as long as it is tracked, referenced as needed and ultimately fixed.

My experience shows below: In Bugzila you will see Field 'Bug Id,' in QC/HP ALM you will find field 'Defect ID' on Internal company specific Monitoring/Support tools you will see mainly 'Incident No:.'

  • 6
    Bug and defect are the same. Issue, incident, and ticket tend to mean a concern raised, without there necessarily being a problem caused by a bug or defect. For example, an issue may turn out to be due to user error. Or it may be a feature request. It's true that some "bug tracking" software (Bugzilla) tracks all sorts of issues besides bugs, and may even refer to all of them colloquially as "bugs", but that's not standard usage, and is probably due to expansion beyond what the software was originally intended for. – LarsH Jun 23 '16 at 0:47
  • @LarsH While technically correct, in the real world incidents get usually called "bugs", "defects", or "incidents", whatever the company culture dictates. Bugs/defects/incidents that get closed with a reason "by design" are technically not bugs/defects, still everyone calls them bugs/defects/incidents, so that is the correct name to call them. – Peter - Unban Robert Harvey Jun 23 '16 at 9:12
  • @Peter: I generally agree with you, though I wouldn't go as far with "everyone" or "correct name to call them." I've done software development in 4 different companies/orgs (and different groups with different cultures within those orgs), and there are plenty of people who won't call an issue a bug unless it's caused by software/hardware not behaving as specified. Especially developers whose reputation is at stake when an issue is claimed to be a "bug" in their software. Yes, we generally know what you mean and don't make a fuss about it, but that doesn't make it correct. – LarsH Jun 23 '16 at 13:32
  • 3
    @LarsH In the companies I have worked in, incidents have been distinctly different from bugs or defects. An incident has been used to describe things like "the server is out of hard drive space" or "a fiber line was cut." In addition to, of course, security incidents. I'm not sure it is fair to universally say incident is equivalent to bugs. Bugs and defects, yes, but IMO, incident is stretching it. – h4ckNinja Jun 23 '16 at 19:09
4

Countless definitions that make a distinction between 'bug' and 'defect' exist. They disagree with each other. They include direct opposites (Bug is A, Defect is B versus Bug is B, Defect is A). To my knowledge, not a single one of these definitions is in wider use. Any distinction made between the terms will be specific to your company, maybe even specific to your group, in your department, in your company.

There are some who claim there is a clear difference, like this one:

  • A bug is the result of a coding error
  • A defect is a deviation from the requirements

or that one:

  • A bug is getting a problem at the time of testing, where as a defect is problem that got by the customer in production time.

or another one:

A defect is an effect, usually caused by human error, of writing correct code. [...] A bug is not a mistake in coding. A bug is the system doing something that isn’t incorrect per se… but it wasn’t purposefully designed in and you didn’t see it coming.

or from a comment on this answer:

"Bug" suggests that the problem, once noticed, is (or is believed to be) trivial to fix. "Defect" (as in "defective by design") suggests that it is not, also that it is a consequence of imperfect specification or design.

or from another answer in this thread:

[...] if the specification says software should do something and the software does that, it's not a bug. But if that makes the software unsuitable for its intended use, it's a defect.

Even more definitions can be found in other answers of this thread.

These definitions are completely at odds with each other. They are also at odds with how I see the terms being used in reality. There is no consistent distinction between the terms that is used across any significant parts of the software industry.

The only somewhat widely used definition is the one that doesn't make a distinction between bug and defect. Without further context of your work environment and their specialized usage of the terms, both 'defect' and 'bug' just mean: "an issue someone encountered, or might possibly encounter, when using the software". But as one can see from the various other answers in this thread, that is not widespread enough to be called "the definition".

  • I'd go slightly further and suggest that there is a difference in everyday usage. "Bug" suggests that the problem, once noticed, is (or is believed to be) trivial to fix. "Defect" (as in "defective by design") suggests that it is not, also that it is a consequence of imperfect specification or design. Compare the handover of a new building where "snags" (bugs) are reported to the lead contractor to be fixed at no added cost (or not, if they are shown to be the unwanted but correct delivery of what the contract and the plans specified). I agree, any hard classification will be of local scope. – nigel222 Jun 23 '16 at 9:58
  • @nigel222 No offense intended, but I'll book that under definition 4, which is again at odds with the 3 other examples. – Peter - Unban Robert Harvey Jun 23 '16 at 10:03
1

The word bug comes from the very first computer bug:

enter image description here

Real bugs don't break computers anymore and overtime this analogy starts makes less and less sense. Therefor I have a mission to get rid of the term bug and always use defect for any software related issue and so should you :)

Quality is a persons perspective, everyone has a different opinion. I think this is the same with something being a defect or not. If you think it is broken then it is broken according to Seth Godin.

If you are interested in the classification of defects I would suggest to have a look at the classification process used in the zero-defect policy.

  • This obviously can't be where the word "bug" came from. If the word "bug" didn't already refer to a problem or defect, why would they say "First actual case of bug being found."? – David Schwartz Jun 23 '16 at 15:54
  • Maybe they envisioned that a bug would break the system? This is the story I also learned at school though. Also mentioned on the Wikipedia, so it must be true ;-) en.wikipedia.org/wiki/Software_bug – Niels van Reijmersdal Jun 23 '16 at 16:00
  • The Wikipedia page points to numerous prior usages of the word "bug". – David Schwartz Jun 23 '16 at 18:57
  • 2
    Yes it does, but those prior usages are not computer/software bugs. They are more of hardware/electrical engineers references. For example, the Thomas Edison example mentioned in Wikipedia page. The article also refers to the story that Niels van Reijmersdal has written!!! – IAmMilinPatel Jun 24 '16 at 5:10
1

Having used many different issue tracking tools, it is common for all these terms 'defect', 'bug', 'issue' etc... to simply be considered as the same thing and you will find that by default they all simply define one of them.

So based on this I would suggest the majority of people would consider them the same thing too.

0

In development testing perhaps no real difference if you stick to comparing the system to the spec. However many things are noticed and logged as defects that are not actually variances from the developer's intentions.

The term bug has been used for a long time. It really means whatever you notice about what you have built that isn't "right" yet. Edison famously defines the term in an 1878 letter

Note: the dig at Grace Hopper on that reference irks me. Her log entry clearly showed she was familiar with the existing term.

0

The difference between bug and defect can be what you make of it. It totally depends on how you define both the terms. Definitions and understanding of terminologies differ from organizations to teams to individuals. Everywhere you go you will see that people have a different understanding of one term and define them as per their understanding.

A bug and a defect can mean the exact same thing to a person while some other person can define it differently.

Some people define Bug and defect as below,

BUG:

  • A bug is the result of a coding error.
  • A human action that produces an incorrect result.
  • Deviation from the expected result.
  • A software bug is an error, flaw, mistake, failure, or fault in a computer program that prevents it from working as intended, or produces an incorrect result.

Defect:

  • A defect is a deviation from the requirements.
  • Problem in algorithm that leads to failure.
  • A defect is for something that normally works, but it has something out-of-spec.
  • A defect is introduced into the software as the result of an error. It is an anomaly in the software that may cause it to behave incorrectly, and not according to its specification.
0

What is the difference between bug and defect?

  • A bug is getting a problem at the time of testing, where as a defect is problem that got by the customer in production environment.

  • A bug is a fault in a program which causes it to behave abruptly. Bugs are usually found either during unit testing done by developer of module testing by testers.

  • A defect is found when the application does not conform to the requirement specification. A defect can also be found when the client or user is testing.

0

As per ISTQB

"defect and bug" both are same when a programmer writes code for a requirement due to some misunderstanding or wrong logic they write wrong code for that requirement because of the error in the code it leads to defect or bug.

"

For example

": We are developing module to calculate interest on the given amount but developer write wrong code to calculate the interest amount due to the error in the code we are getting wrong (maybe less or more) interest amount, here we are not getting expected result against the requirement, so this is a bug or defect.

-1

I disagree with the answers that suggest a bug and defect are the same thing.

In software testing, a bug is an erroneous behaviour that results from a code defect. A code defect is a flaw in the code that causes it not to correctly meet its corresponding specification.

In comparison, a defect (used without qualification) is a deviation from specification or requirements. A specification that is stated incorrectly is a defect - and code which correctly meets the stated specification would also be considered bug free. A requirement that is not met by any code is also considered a defect (until code is written that correctly meets the requirement) - non-existent code cannot exhibit a bug.

Of course, a bug may be associated with a defect, since the presence of a bug may cause the code to deviate from its requirements. But that doesn't mean they are the same thing.

-1

For the person who says there is no difference, I'd ask them this question: "Say a particular piece of code causes a product to misbehave. There's certainly a bug in that piece of code. The code is not essential, so it's just commented out. Has the bug in the application been found and fixed? Is there still a defect in the application?"

I think most people will answer "no" and "yes". We still haven't found the problem in that code or fixed it. But we've prevented it from causing a defect.

Often there is no difference. Most defects are caused by bugs. Most bugs cause detects.

A bug is an error in a piece of code. It may not have any consequences, for example, it may trigger only in cases that do not occur in any product that uses that code.

A defect is something wrong that causes unexpected behavior or makes something less suitable for its actual uses.

A defect is often caused by a bug but not always. For example, if the specification says software should do something and the software does that, it's not a bug. But if that makes the software unsuitable for its intended use, it's a defect.

A bug may cause a defect but not always. For example, if the specification says a certain error case should be handled a certain way and the code doesn't do that, it's a bug in that code. But if the project that contains that code does can be shown to be incapable of producing that case, it's not a defect in that project.

When you're talking specifically about development of code that will be used in various projects, there is no difference. Any bug has to be considered a defect.

-1

The only difference is the audience you are addressing. Tester and Developer

Defect: Defect is an error in coding or logic that causes a program to malfunction or to produce incorrect/unexpected results.

Bug: If that defect accepted by programmer is called bug.

Not the answer you're looking for? Browse other questions tagged or ask your own question.