Certopolis

ISTQB Certified Tester Foundation Level

Error vs defect vs failure vs root cause in ISTQB CTFL

A person makes an error (a mistake). The error produces a defect (also called a fault or bug) in a work product. When defective code runs, it may cause a failure: the system does not do what it should, or does something it should not. A root cause is the fundamental reason the problem occurred, per ISTQB's CTFL v4.0 syllabus.

How are errors, defects and failures linked?

The chain runs in one direction. A human makes an error. The error leaves a defect in something the person produced. If that defect is in code and the code runs, a failure may be observed.

The syllabus names typical reasons for errors: time pressure, tiredness, lack of adequate training, and complexity, whether in the work products, the processes, the infrastructure or the interactions.

Defects are not limited to source code. A requirements specification or a test script can contain one, and so can a supporting work product like a build file. An undetected defect in an early work product tends to be carried into the work products built on it.

Does every defect cause a failure?

No. Some defects cause a failure every time the code runs. Others cause a failure only in specific circumstances. Some never cause a failure at all. A routine can run in production for years before the one input that exposes its defect arrives.

Not every failure comes from a human error either. Environmental conditions can cause failures too. The syllabus example is firmware damaged by radiation or an electromagnetic field.

What is a root cause?

A root cause is the underlying reason a problem arose, for example the circumstances that made the error likely. Teams look for it with root cause analysis, usually after a defect has been found or a failure has happened. Addressing the root cause, for example by removing it, is expected to prevent similar defects and failures or make them less frequent.

Example: a new developer gets no training on an in-house library (root cause). He misunderstands what unit one of its functions expects (error). He writes a call that passes the wrong unit (defect). At run time a customer is charged the wrong amount (failure).

Where the exam catches people

  • Calling the wrong result on screen a defect: what you observe when the software runs is the failure. The defect is the flaw in the code or document behind it.
  • Calling the developer's misunderstanding a defect: the human mistake is the error. The defect is what the mistake left in the work product.
  • Believing code that has run for years without trouble has no defect: some defects cause a failure only in specific circumstances, and some never do.
  • Treating the error and the root cause as the same thing: the root cause is the situation that led to the error, such as missing training.
  • Believing every failure traces back to a human error: environmental conditions can also cause failures.

Written from these sources

Try 3 questions on this

Pick an answer to see why each option is right or wrong.

  1. A developer misreads a requirement and codes a discount of 15% instead of 5%. During system testing, an invoice shows the wrong total. Which of the following correctly classifies the developer's misreading of the requirement? Select ONE option.

    Right. In the game that’s Renown for your Fundamentals of Testing building.

    Not that one: C is right. In the game your Fundamentals of Testing building would lose a little Renown, and this question would come back later.

  2. During a code review of a payment service, a reviewer finds a defect in how one routine rounds currency amounts. The routine has run in production for three years, its regression tests have always passed, and no failure linked to it has ever been reported. Which of the following BEST explains this? Select ONE option.

    Right. In the game that’s Renown for your Fundamentals of Testing building.

    Not that one: B is right. In the game your Fundamentals of Testing building would lose a little Renown, and this question would come back later.

    Show the full explanation and doc quotes

    A rounding defect that has run for three years without a reported failure is most plausibly of the second kind: the values or situations that trigger it have not yet reached the routine, in production or in its tests.

    Written from istqb.org/wp-content/uploads/2024/11/ISTQB_CTFL_Syllabus_v4.0.1.pdf

  3. A developer joins a team and is given no instruction on the in-house payment library. He calls one of its functions with the amount in cents where it expects euros, and customers are charged 100 times too much in production. Root cause analysis follows. Which of the following is the root cause? Select ONE option.

    Right. In the game that’s Renown for your Fundamentals of Testing building.

    Not that one: A is right. In the game your Fundamentals of Testing building would lose a little Renown, and this question would come back later.

    Show the full explanation and doc quotes

    The wrong call is there because the developer passed cents where euros were expected: that is the error. Root cause analysis asks one more question, namely what set the developer up to make that slip, and the stem answers it. Nobody showed him how the library works, so the missing training is the root cause.

    Written from istqb.org/wp-content/uploads/2024/11/ISTQB_CTFL_Syllabus_v4.0.1.pdf

Ask for something