Skip to content
← All CTFL learning objectives

CTFL 1.2.3: Distinguish between root cause, error, defect, and failure

K2

Syllabus section 1.2.3

3 original PrepBench practice questions for learning objective 1.2.3 of the CTFL 4.0 syllabus. Try the examples below and check each answer against its syllabus reference.

Practice questions

Question 1

A developer misunderstands a requirement and writes an incorrect calculation into the code. When a user later runs the application, it displays a wrong total. Which of the following maps these events correctly?

  1. The misunderstanding is the failure, the incorrect code is the error, the wrong total is the defect
  2. The misunderstanding is the error, the incorrect code is the defect, the wrong total is the failure
  3. The misunderstanding is the root cause, the incorrect code is the failure, the wrong total is the defect
  4. The misunderstanding is the defect, the incorrect code is the error, the wrong total is the failure
Show answer
  • The misunderstanding is the failure, the incorrect code is the error, the wrong total is the defectA human mistake is the error, not a failure; the runtime wrong total is the failure.
  • Correct answer: The misunderstanding is the error, the incorrect code is the defect, the wrong total is the failureThe human mistake is the error, the flawed code is the defect, the wrong total is the failure.
  • The misunderstanding is the root cause, the incorrect code is the failure, the wrong total is the defectThe flawed code is a defect, not a failure; the failure is the wrong total observed at runtime.
  • The misunderstanding is the defect, the incorrect code is the error, the wrong total is the failureThe human mistake is the error, not a defect; the defect is the resulting flaw in the code.

An error (mistake) is a human action that produces an incorrect result — here the misunderstanding. The defect (fault, bug) is the resulting flaw in the work product — the incorrect code. A failure is the deviation observed at runtime — the wrong total displayed to the user.

Syllabus section 1.2.3

Question 2

Under heavy end-of-sprint time pressure, a developer misreads the rounding rule in the requirements and writes code that rounds discounts down instead of up. Weeks later a customer receives an invoice on which the discount is one cent too low. Which assignment of this chain is correct?

  1. Root cause: misreading the rule; error: the time pressure; defect: the invoice; failure: the rounding code
  2. Root cause: the rounding code; error: the invoice; defect: misreading the rule; failure: the time pressure
  3. Root cause: the time pressure; error: misreading the rule; defect: the rounding code; failure: the invoice
  4. Root cause: the time pressure; error: the rounding code; defect: misreading the rule; failure: the invoice
Show answer
  • Root cause: misreading the rule; error: the time pressure; defect: the invoice; failure: the rounding codeThis swaps the fundamental situation with the human mistake, and the flaw in the code with the observed symptom.
  • Root cause: the rounding code; error: the invoice; defect: misreading the rule; failure: the time pressureThis inverts the whole chain, treating the flaw in the code as the fundamental reason for the problem.
  • Correct answer: Root cause: the time pressure; error: misreading the rule; defect: the rounding code; failure: the invoiceThe time pressure is the fundamental reason, misreading is the mistake, the code holds the defect, and the invoice is the failure.
  • Root cause: the time pressure; error: the rounding code; defect: misreading the rule; failure: the invoiceRoot cause and failure are right, but the human mistake is the error and the flaw it left in the code is the defect.

A root cause is a fundamental reason for the occurrence of a problem, such as a situation that leads to an error — here the time pressure. Human beings make errors (mistakes), which produce defects, which in turn may result in failures: misreading the rule is the error, the code that rounds the wrong way is the defect, and the invoice showing the wrong discount is the failure produced when that defect is executed.

Syllabus section 1.2.3

Question 3

Besides human errors and the defects they introduce, what else can cause failures?

  1. A defect that was introduced earlier in the SDLC and never detected
  2. A requirement that was specified correctly but implemented incorrectly
  3. A defect in the code that is executed under specific circumstances only
  4. Environmental conditions, such as radiation or electromagnetic fields
Show answer
  • A defect that was introduced earlier in the SDLC and never detectedAn undetected earlier defect is still a defect, which the question excludes.
  • A requirement that was specified correctly but implemented incorrectlyAn incorrect implementation of a correct requirement is a defect.
  • A defect in the code that is executed under specific circumstances onlyA defect executed only in specific circumstances is still a defect.
  • Correct answer: Environmental conditions, such as radiation or electromagnetic fieldsEnvironmental conditions such as radiation are named as a separate cause.

Errors and defects are not the only cause of failures. Failures can also be caused by environmental conditions, such as when radiation or electromagnetic fields cause defects in firmware. The other three options all describe routes that run through a defect, which is the cause the question sets aside.

Syllabus section 1.2.3

Original PrepBench practice material, not official exam questions or exam dumps. PrepBench is independent and is not affiliated with or endorsed by ISTQB®.

Glossary terms in this chapter