14

Possible Duplicate:
Difference between defect and bug in testing

In computer science technical writing, especially in software engineering, what's the difference between fault, error and defect?

I want to quote an answer on Stack OverFlow by Daniel Joseph:

To quote the Software Engineering Body of Knowledge

Typically, where the word “defect” is used, it refers to a “fault” as defined below. However, different cultures and standards may use somewhat different meanings for these terms, which have led to attempts to define them. Partial definitions taken from standard (IEEE610.12-90) are:

Error: “A difference…between a computed result and the correct result”

Fault: “An incorrect step, process, or data definition in a computer program”

Failure: “The [incorrect] result of a fault”

Mistake: “A human action that produces an incorrect result”

Based on my understanding of above definition, error is the result of fault, i.e., failure. Could someone explain more clearly?

  • 1
    I _strongly_ suspect the answer is **nothing**, except in papers that explicitly invoke IEEE610.12-90. – JeffE Jan 20 '13 at 22:31
  • 5
    In IEEE610.12-90's definitions the key word that differentiates an error from a fault is "computed". An error is an incorrect result of a completed computation, a fault is an incorrect step that prevented computation from completing (e.g. a syntax error). – yannis Jan 21 '13 at 04:42
  • 1
    The answer is "it depends on whose vocabulary you are using" and this question sure is not a duplicate of "Difference between defect and bug in testing". – David Tonhofer Sep 07 '14 at 08:56
  • 3
    How is this a duplicate? This is a completely different question, and deserves its own place. – mafu Feb 14 '16 at 14:40

2 Answers2

23

According to Fundamental Concepts of Dependability:

A system failure is an event that occurs when the delivered service deviates from correct service. A system may fail either because it does not comply with the specification, or because the specification did not adequately describe its function. An error is that part of the system state that may cause a subsequent failure: a failure occurs when an error reaches the service interface and alters the service. A fault is the adjudged or hypothesized cause of an error.

I understand defect as just another name for fault.

Bug is confusing and can represent a fault or a failure depending on the context.

mouviciel
  • 15,473
  • 1
  • 37
  • 64
  • Defect is a special case of a fault. Other common fault types include hardware malfunction and misconfiguration. – Jirka Hanika Oct 13 '15 at 08:20
  • @JirkaHanika - How would you define _defect_ ? – mouviciel Oct 13 '15 at 11:01
  • I meant software defects (something wrong in source code). Faults include software defects, hardware malfunctions, misconfigurations. Hardware malfunctions can result from design issues, manufacturing issues, lack of maintenance, power fluctuations, ESD, interference, impact damage and so on. Design issues may include firmware defects which are just software defects on another level, but you might not know that when you trace a system failure to a hardware malfunction. It's quite common that a system failure involves a cascade of various faults, triggered by one of them or by external input. – Jirka Hanika Oct 13 '15 at 14:21
  • Do you agree with my following interpretation of that fragment? 1) If we are talking about software, fault is a part of source code and/or a design, it is a "static thing" 2) error is a state of a runtime, "a dynamic thing" 3) generally, a fault causes a chain of errors 4) a failure is an observable error – Alexey Sep 08 '19 at 17:33
  • @Alexey: Exactly. – mouviciel Sep 08 '19 at 18:08
  • Thanks. Unfortunately, there are two widespread definitions for "error": this one and "a programmer's mistake". Provided the ambiguity, I would avoid using the word "error" without a clarification. For the other terms there is no significant disagreement among the sources. – Alexey Sep 08 '19 at 19:30
0

With reference to the definitions used in the linked article, an error is not the result of a fault, but potentially the cause - if the error is outside of the tolerance of the system. Most systems dealing with real data have some degree of error, but are designed to tolerate them.

Pete Kirkham
  • 1,798
  • 14
  • 15