The seven testing principles explained for ISTQB CTFL
ISTQB's CTFL v4.0 syllabus lists seven principles: testing shows the presence, not the absence, of defects; exhaustive testing is impossible; early testing saves time and money; defects cluster together; tests wear out; testing is context dependent; and the absence-of-defects fallacy. Exam questions describe a situation and ask which principle it illustrates.
What does each principle say?
Testing shows the presence, not the absence, of defects. A test can reveal that defects exist. Testing lowers the chance that defects stay undiscovered, but finding none does not prove the test object is correct. Exhaustive testing is impossible. Outside trivial cases nobody can test everything, so effort is focused with test techniques, test case prioritization and risk-based testing.
Early testing saves time and money. A defect removed early does not cause further defects in the work products derived from it, and fewer failures happen later. Both static and dynamic testing should start as early as possible. Defects cluster together. Most of the defects found, or most of the failures in operation, usually come from a few components. The syllabus calls this an illustration of the Pareto principle.
Tests wear out. Repeating the same tests many times makes them less and less effective at finding new defects. The remedy is to change existing tests and test data and to write new tests. Testing is context dependent. No single approach fits every situation.
Absence-of-defects fallacy. Expecting verification alone to make a system successful is a mistake. A system can pass thorough testing of every specified requirement, have every found defect fixed, and still not meet users' needs, not help the customer's business goals, or be worse than competing systems. Validation is needed as well as verification.
Which principles do exam scenarios mix up?
Presence-not-absence and the absence-of-defects fallacy sound alike. The first is about what testing can prove: a clean test run is not proof that no defects remain. The second is about what makes a product succeed: even a product with no known defects fails if it is not what users need.
Tests wear out has an exception. Repeating the same tests can be useful, and the syllabus gives automated regression testing as the example. The principle is about finding new defects, not about checking that existing behaviour still works.
Defect clusters feed risk-based testing. Clusters that are predicted, and clusters actually seen in testing or in live use, help decide where to concentrate test effort. A module that produced most of the past failures gets more testing, not less, even after those defects were fixed.
Where the exam catches people
Reading a test run with no failures as proof the software is defect-free: testing can show defects are present but cannot prove there are none.
Picking presence-not-absence when the scenario is a defect-free product nobody wants: that is the absence-of-defects fallacy.
Believing tests wear out means regression tests should not be repeated: the syllabus names automated regression testing as a case where repetition helps.
Spreading test effort evenly across all components when history shows a few cause most failures: defects cluster, so effort follows the clusters.
Believing early testing means only reviews: both static testing and dynamic testing should start as early as possible.