Difference between a defect and a bug in testing?

  • What is the difference between a defect and a bug?

    There are bugs that actually say that something is missing which means they are feature request, not bugs.

    Answer depends on the purpose why are you asking.

    Look up the etymology of the word defect. De=not, un. Facere=do. Hence, does not do (as expected), does not perform, is broken, kaput. Whereas bug means "something in the works impeding performance". At the end of the day you will have to fix something, so it is all academic. I voted to close, don't you have some bugs to fix?!

    • A bug is the result of a coding error

    • A defect is a deviation from the requirements

    That is: A defect does not necessarily mean there is a bug in the code, it could be a function that was not implemented but defined in the requirements of the software.


    From the Wikipedia page on software testing:

    Not all software defects are caused by coding errors. One common source of expensive defects is caused by requirement gaps, e.g., unrecognized requirements, that result in errors of omission by the program designer.[14] A common source of requirements gaps is non-functional requirements such as testability, scalability, maintainability, usability, performance, and security.

    Both are "deviations from requirements" as I see it.

    A defect doesn't have to be a bug. Also, a bug doesn't have to mean a requirement was not meet, and hence is not 'a deviation from requirement'

    Plus, there may not have been a requirement that, for example, all the buttons on a screen line up nicely, but someone may well enter a bug if they don't, and the developer will almost certainly be asked to fix it.

    A bug which crashes the app, is a deviation from requirements, no? Or a bug which causes rounding errors due to using long vs double. Defect or bug? Or a popup which is not shown. Bugs or defects, they're the same: things that are wrong, mistakes.

    You seem to be missing the point @Martin. Yes, a bug can be a defect. Yes, a defect can be a bug. But that isn't necessarily always true. Just because there is some overlap, doesn't mean they are identical! Venn Diagram of Bug & Defect -> **(())**

    @Dan McGrath: basically what you did here is your own definition of a bug. But in general there isn't any defined meaning, it's just an engineering jargon!

    @DanMcGrath: Your Venn Diagram is useless. It could mean either **({})** or **({)}**. I assume you meant the second.

    You can find a deviation from requirements in a design document. To find a bug you have to look at code.

License under CC-BY-SA with attribution


Content dated before 6/26/2020 9:53 AM