SaveMyCert
Log in
5 of 5 free questions left today·for 30 a day
Fundamentals of Testing

CTFL Why Testing Is Necessary: QA vs QC, Errors and Failures

10 min readCTFL · Fundamentals of TestingUpdated

Testing is necessary because it finds defects cost-effectively, measures quality to support decisions such as release, represents users who cannot be involved throughout development, and may be required by contract, law or regulation. This CTFL lesson covers syllabus section 1.2: the four contributions of testing to success, how testing (a form of quality control) differs from quality assurance, and the chain from root cause to error, defect and failure.

What you’ll learn
  • Give examples of the four ways testing contributes to project success and recognise which one a scenario shows
  • Explain why testing improves quality only indirectly, through the removal of the defects it detects
  • Recall that testing is a form of quality control, and contrast process-oriented, preventive QA with product-oriented, corrective QC
  • Describe how test results are used by QC to fix defects and by QA as feedback on processes
  • Distinguish root cause, error, defect and failure, including defects in documentation and build files
  • Explain why some defects never cause failures and how environmental conditions can cause failures
  • Identify which action addresses a root cause rather than a single defect

Why is testing necessary?

Testing is necessary because it is a cost-effective way to find defects, a direct measure of quality, a stand-in for users who cannot be involved throughout development, and sometimes a contractual, legal or regulatory obligation. As a form of quality control, it helps a project reach its agreed goals within the set scope, time, quality and budget constraints.

The syllabus names four distinct contributions. Each one answers a different question, so a scenario usually points at exactly one of them:

ContributionWhat it meansThe clue in a scenario
Detecting defects cost-effectivelyTesting reveals defects; once they are removed, the test object is better. The quality gain is indirect.Something is found and then fixed.
Directly evaluating qualityTest results measure the test object at different stages of the software development lifecycle (SDLC).Someone uses the results to decide: move to the next stage, release, postpone.
Representing users indirectlyTesters keep their understanding of users' needs in view throughout the lifecycle.Real users cannot take part all the way through.
Meeting contractual, legal or regulatory requirementsA contract, a law or a standard may demand testing or test evidence.An outside party (customer, regulator, authority) requires it.

Contribution to success is not limited to the test team: any stakeholder who applies testing skills, such as a business analyst reviewing a requirement, helps the project too.

Testing improves quality indirectly: detection versus removal

Testing improves the test object indirectly: it detects defects, and the improvement happens when those defects are removed by debugging, which is a separate, non-testing activity. A tester who reports a failure has made the fix possible but has not changed the product; the developer who locates and corrects the defect is the one who changes it.

Two wrong ideas follow from blurring this line:

  • "Testers remove defects during test execution." Locating and correcting the cause is debugging. (The full testing-versus-debugging distinction belongs to the lesson on what testing is.)
  • "Testing showed the product has no defects left." Testing can show defects are present but cannot prove there are none, so it never certifies a defect-free product.

Testing also covers more than code: testing components, systems and their documentation all help identify defects.

Testing evaluates quality to support decisions

Testing provides a direct evaluation of the test object's quality at various stages of the SDLC, and those measures feed project management decisions such as whether to move to the next stage or whether to release.

This contribution is about information, not repair. When a test manager reports coverage and pass rates at the end of integration testing and the project decides the build is ready to enter system testing, nothing in the product has been fixed by that report; testing has measured the product and the measurement has informed a decision. That makes it different from defect detection (which leads to a fix) and from quality assurance (which would change a process).

Testers represent users, and testing can be required

Testing gives users indirect representation on a development project: testers make sure their understanding of users' needs is considered throughout the development lifecycle. The alternative, involving a representative set of real users all the way through, is not usually possible because of the high cost and the lack of suitable, available users. That cost and availability problem is the reason testers act on users' behalf, not a claim that testers are more skilled or more objective than users.

Testing may also be required to meet contractual or legal requirements, or to comply with regulatory standards. A customer contract may specify test levels or evidence, and an aviation or rail safety authority may refuse certification of a safety-critical system without documented testing. In these cases the reason for testing comes from outside the project.

Quality assurance versus quality control

Testing and quality assurance (QA) are not the same thing: testing is a form of quality control (QC), and QA is about processes. People often use "testing" and "QA" interchangeably, but the syllabus separates them sharply.

Quality assurance (QA)Quality control (QC)
OrientationProcess-orientedProduct-oriented
ApproachPreventiveCorrective
FocusImplementing and improving processesActivities that support achieving appropriate levels of quality
Underlying ideaA good process, followed correctly, generates a good productExamine the product and correct what is wrong
ExamplesDefining, auditing and improving development and test processesTesting (a major form), formal methods such as model checking and proof of correctness, simulation, prototyping
Use of test resultsFeedback on how well the development and test processes are performingGetting defects fixed

QA applies to both development and testing processes, and it is the responsibility of everyone on a project, not of a separate QA team.

The pairing matters because the wrong combinations are easy to mix up: QA is process + preventive, QC is product + corrective. "Process-oriented, corrective" or "product-oriented, preventive" describe neither.

How test results feed both QA and QC

The same test results serve both: QC uses them to get defects fixed, and QA uses them as feedback on how well the development and test processes are working.

This gives a practical way to tell which one is happening, or which one is missing:

  • When results are used to correct the product (a reported defect is fixed and the fix is confirmed), they are serving QC.
  • When results are used to change how the team works (for example, defect data shows many problems start in unclear interface agreements, so the team adds an interface design walkthrough), they are serving QA as process feedback.

A product can be well controlled while its process stays unimproved. Fixing everything that testing finds says something about this product; it says nothing about whether the process that keeps producing those defects is getting better. That second question is the one QA asks.

Error, defect and failure

An error is a human action that produces an incorrect result; a defect is an imperfection or deficiency in a work product where it does not meet its requirements or specifications; a failure is an event in which a component or system does not perform a required function within specified limits. People make errors (mistakes), which produce defects (also called faults or bugs), which in turn may result in failures.

TermWhat kind of thing it isWhere you find itExample
Error (mistake)A human actionIn what a person did or thoughtA developer forgets that an input list can be empty
Defect (fault, bug)A flaw in a work productIn documentation, code or supporting work productsA condition uses < where the specification requires ≤
FailureAn event observed when the system runsIn behaviourA booking form accepts a departure date in the past
Root causeThe fundamental reason for the problemIn the situation behind the errorTime pressure, lack of training

To classify any item in a scenario, ask what it is: something a person did (error), something wrong inside a work product (defect), something the running system did or failed to do (failure), or the circumstance that made the person go wrong (root cause). A wrong line of code is never a failure by itself; it is a defect that may or may not fail.

Where defects live, and defects that never fail

Defects can be in any work product, not only code, and a defect does not always cause a failure.

Defects are found in documentation (a requirements specification, a test script), in source code, and in supporting work products such as a build file. Defects in work products produced earlier in the SDLC, if they go undetected, often lead to defective work products later: an incorrect formula in a design document can be coded faithfully, so one design defect becomes a code defect too. This is one reason early testing and reviews pay off.

When defective code is executed, the system may fail to do something it should, or do something it should not. But execution does not guarantee a failure:

  • some defects cause a failure every time they are executed;
  • some cause a failure only in specific circumstances (for example, only on 29 February, or only when a particular time zone is set);
  • some may never cause a failure in the whole life of the system.

So a defect whose triggering condition has never occurred is still a defect, even though no failure has happened yet. And a clean test run does not rule out failures in operation, because the conditions that trigger a defect may simply not have been exercised.

Failures caused by the environment

Errors and defects are not the only causes of failures: environmental conditions can cause them too, for example when radiation or electromagnetic fields cause defects in firmware.

The chain still runs through a defect. If radiation in orbit corrupts some bits of a satellite controller's correctly written firmware, the corrupted firmware now contains a defect, and running it produces the failure (the controller restarts unexpectedly, say). What is different is the origin: no human error introduced that defect. This is the exception to "every defect starts with a mistake".

Root causes and root cause analysis

A root cause is a fundamental reason for the occurrence of a problem, such as a situation that leads to an error; root cause analysis identifies it so that similar failures or defects can be prevented or made less frequent.

People make errors for many reasons: time pressure; complexity of work products, processes, infrastructure or interactions; tiredness; or a lack of adequate training. Those situations are typical root causes. Root cause analysis is typically performed when a failure occurs or a defect is identified.

The key distinction is between fixing this problem and preventing the next one:

Question to askActs on the problem foundActs on the root cause
What does it change?The work product (the defect is corrected) or how defects are detectedThe situation that leads people to make the error
Example where the cause is an unrealistic deadlineDebugging the rushed module; adding checks to spot its defectsPlanning realistic schedules so work is not rushed
Example where the cause is an overly complex interfaceFixing each misuse of the interface as it is reportedSimplifying the interface so it is harder to misuse
Effect on similar defectsThey keep being made; some are caught soonerFewer of them are made in the first place

Detecting and correcting defects still matters, but only an action on the underlying situation prevents similar defects or makes them less frequent.

Tip. Questions on this topic are mostly short definition and classification items. They assess whether you can match a scenario to one of the four contributions of testing, distinguish QA from QC by orientation (process or product), approach (preventive or corrective) and how each uses test results, and recall who is responsible for QA. Error, defect, failure and root cause items describe a short chain of events and ask what one element is or which mapping of terms is correct, including defects outside the code, defects that have not failed, and failures with an environmental origin. Root cause items assess whether you can tell an action on the underlying situation from one that fixes or detects individual defects.

Key takeaways
  • Testing contributes in four ways: cost-effective defect detection, direct evaluation of quality for decisions, indirect representation of users, and meeting contractual, legal or regulatory requirements.
  • Testing improves quality indirectly: the gain comes when debugging removes the defects testing found.
  • Testers represent users because involving a representative set of real users throughout is usually too costly or impractical.
  • Testing is a form of quality control. QC is product-oriented and corrective; QA is process-oriented and preventive and is everyone's responsibility.
  • Other forms of QC include formal methods (model checking, proof of correctness), simulation and prototyping.
  • Test results serve both: QC uses them to fix defects, QA uses them as feedback on development and test processes.
  • Error (human action) leads to a defect (flaw in a work product), which may lead to a failure (an event at run time).
  • Defects occur in documentation, code and supporting work products such as build files, and undetected early defects often spread into later work products.
  • Some defects fail every time, some only in specific circumstances, some never; environmental conditions such as radiation can also cause defects in firmware.
  • A root cause is the situation behind an error (time pressure, lack of training); addressing it prevents or reduces similar defects, while debugging fixes only the one defect.

Frequently asked questions

Why is software testing necessary according to the ISTQB CTFL syllabus?

The ISTQB CTFL syllabus gives four reasons testing is necessary: it detects defects cost-effectively so they can be removed, it directly evaluates quality to support decisions such as release, it represents users' needs when real users cannot be involved throughout development, and it may be required to meet contractual, legal or regulatory requirements.

What is the difference between an error, a defect and a failure?

An error is a human action that produces an incorrect result, such as forgetting that an input can be empty. A defect is an imperfection in a work product, such as wrong code or an ambiguous specification. A failure is an event in which the system does not perform a required function within specified limits. An error can produce a defect, which may then cause a failure when executed.

Is testing the same as quality assurance?

No. In the ISTQB syllabus, testing is a form of quality control (QC), which is product-oriented and corrective. Quality assurance (QA) is process-oriented and preventive: it implements and improves processes on the basis that a good process followed correctly produces a good product. QA applies to development and testing and is everyone's responsibility.

Can a defect exist without causing a failure?

Yes. Some defects cause a failure every time they are executed, some only under specific circumstances, and some never cause a failure during the life of the system. A defect whose triggering condition has never occurred is still a defect even though no failure has been observed.

What is a root cause in software testing?

A root cause is the fundamental reason a problem occurred, typically a situation that leads someone to make an error, such as time pressure or a lack of training. Root cause analysis is usually done when a failure occurs or a defect is found, and addressing the root cause aims to prevent similar defects or failures or make them less frequent.

How are test results used in QA and QC?

Quality control uses test results to get defects fixed in the product. Quality assurance uses the same results as feedback on how well the development and test processes are performing, so that the processes can be improved and similar defects prevented.

Can failures happen without a human error?

Yes. Environmental conditions such as radiation or electromagnetic fields can cause defects in firmware, and executing that altered firmware leads to failures, even though no person made an error.

Source

This lesson covers the "Fundamentals of Testing" domain of the official CTFL exam guide. Vendors revise their guides — check the source for the current version.

Test yourself on this topic
Practice now

Sign up free to mark lessons complete, bookmark topics and track your exam readiness.

Spotted a mistake in this lesson?