zaro

What are the 7 principles of testing?

Published in Testing Principles 3 mins read

The seven principles of software testing provide a foundational guide for effective and efficient testing practices. These principles help testers approach their work strategically and comprehensively. Here they are explained:

  1. Testing shows the presence of defects: Testing can reveal defects, but it cannot prove that software is defect-free. It reduces the probability of undiscovered defects remaining in the software. In other words, successfully running tests demonstrate that faults do exist, not that faults don't exist.

  2. Exhaustive testing is impossible: Testing everything (all combinations of inputs and preconditions) is not feasible except for trivial cases. Therefore, testing efforts should be focused on the most critical areas, based on risk analysis, requirements, and potential impact.

  3. Early testing: Testing activities should start as early as possible in the software development life cycle (SDLC). Early testing saves time and money in the long run, as defects are identified and fixed sooner, when they are less costly to resolve. This is sometimes referred to as "Shift Left Testing."

  4. Defect clustering: A small number of modules usually contain most of the defects discovered during pre-release testing or show the most operational failures. This is often related to the Pareto Principle (80/20 rule), where 80% of the problems are found in 20% of the modules. Identify these high-risk areas and concentrate testing efforts there.

  5. Pesticide paradox: If the same set of tests are repeated over and over again, eventually these tests will no longer find any new bugs. To overcome this, it is necessary to regularly review and revise tests, and create new and different tests to exercise different parts of the software or system to find more defects. Another solution can be to use the randomization of test data to avoid the pesticide paradox.

  6. Testing is context dependent: Testing is done differently in different contexts. For example, testing an e-commerce website will be different from testing a safety-critical system like an aircraft's flight control software. Consider factors such as industry standards, regulatory requirements, and the specific risks associated with the application.

  7. Absence-of-errors fallacy: Finding and fixing defects does not guarantee the success of the software. It is possible that the system is thoroughly tested for the wrong requirements. Even if no defects are found, the system may still be unusable if it does not meet the needs and expectations of the users.

In summary, understanding and applying these seven principles leads to more effective, efficient, and valuable testing practices throughout the software development lifecycle.