In testing, issue and bug* are often used. However, in the context of "Fundamentals of Testing" and the ISTQB syllabus, there are define and explain crucial concepts of errors, defects, failures, and root causes. Understanding these concepts is essential for effective software testing and quality assurance.

1. Errors (mistakes)

Human beings make errors (mistakes), which produce defects (faults, bugs), which in turn may result in failures. These errors can occur for various reasons, including time pressure, the complexity of work products, processes, infrastructure, interactions, or simply due to tiredness or lack of adequate training

Example:

  • A tester may misinterpret the requirements and write a test case that does not accurately reflect what the software is supposed to do.
  • A project manager may miscommunication the project timeline, leading to rushed development and testing processes.
  • A business analyst may overlook a critical requirement, resulting in a gap in the software's functionality.

2. Defects (faults, bugs)

Defects (faults, bugs) are produced as a result of human Errors. Defects can be found in various work products, such as documentation (e.g., requirements specifications, test cases), source code, or supporting work products like build files.

Defects in work products produced earlier in the software development lifecycle (SDLC), if not detected, often lead to defective work products later in the lifecycle.

Example:

  • A defect in the code may cause the software to crash or hang when a user tries to perform a specific action.
  • A defect in the requirements may lead to a misunderstanding of what the software is supposed to do, resulting in incorrect functionality.
  • A defect in the test case may cause a test to fail even when the software is functioning correctly.
  • A defect in the documentation may lead to confusion among team members about the project's goals and objectives.

Static testing can use to find defects in work products (e.g., requirements, design, code) before they are executed.

More information

3. Failures

Failures occur if a defect in the code is executed, causing the system to deviate from its intended behavior by not doing what it should do or by doing something it should not.

It's important to note that not all defects will always result in a failure upon execution; some might only cause a failure under specific circumstances, while others may never lead to a failure.

Furthermore, failures are not only caused by errors and defects in the software itself but can also result from environmental conditions, such as hot weather, humidity, or other external factors.

Example:

  • A failure may occur when a user tries to log in to the software, but the system crashes instead of allowing access.
  • A failure may occur when a user tries to save a document, but the software hangs and does not respond.
  • A failure may occur when a user tries to print a document, but the software sends the wrong data to the printer.
  • A failure may occur when a user tries to access a specific feature, but the software returns an error message instead of the expected result.

Dynamic testing can trigger failures caused by defects in the software, which can be identified through various testing techniques, such as functional testing, performance testing, and security testing.

More information

4. Root Causes

A root cause is the fundamental underlying reason for the occurrence of a problem, often a situation that leads to an error. Root cause analysis is typically performed when a failure occurs or a defect is identified to determine these fundamental reasons. Addressing the root cause is believed to prevent similar failures or defects in the future or reduce their frequency, often by removing the root cause

Example:

  • A root cause of a software failure may be a lack of proper testing, leading to undetected defects in the code.
  • A root cause of a defect in the requirements may be a lack of communication between the business analyst and the development team.
  • A root cause of a defect in the test case may be a lack of understanding of the software's functionality by the tester.
  • A root cause of a defect in the documentation may be a lack of attention to detail by the technical writer.
  • A root cause of a defect in the code may be a lack of proper coding standards or guidelines.
  • A root cause of a defect in the test environment may be a lack of proper configuration or setup.

Five Whys is a technique used to identify the root cause of a problem by asking "why" multiple times until the fundamental reason is uncovered.

More information

Conclusion

(root causes) ? errors -> defects -> failures

The relationship between these concepts is sequential: human beings make errors, which lead to defects in work products, and if these defects in executable code are triggered, they can result in failures. Identifying the root cause helps in preventing future errors and defects

References