Difference Between a Defect and a Bug in Testing

quality-attributesterminology

What is the difference between a defect and a bug?

Best Answer

  • 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.