Principles of Software Testing:

 Principles of Software Testing:

1. Testing shows the presence of defects, not their absence

2. Exhaustive testing is impossible

3. Absence-of-errors is a fallacy

4. Early testing saves time and money

5. Testing is context-dependent

6. Defects cluster together

7. Beware of the pesticide paradox 

1. Testing shows the presence of defects, not their absence:

  • Testing can show that defects are present but cannot prove that there are no defects. Testing reduces the probability of undiscovered defects remaining in the software, but testing is not proof of correctness even if no defects are found. 

2. Exhaustive testing is impossible:

  • Testing everything (all combinations of inputs and preconditions) is not feasible except for trivial cases.
  • Rather than attempting to test exhaustively, risk analysis, test techniques, and priorities should be used to focus test efforts. 

3. Early testing saves time and money:

  • To find defects early, both static and dynamic test activities should be started as early as possible in the software development lifecycle.
  • Testing early in the software development lifecycle helps reduce or eliminate costly changes.

4. Absence-of-errors is a fallacy

  • Some organizations expect that testers can run all possible tests and find all possible defects, but this is impossible. It is a fallacy (i.e., a wrong belief) to expect that just finding and fixing a large number of defects will ensure the success of a system.
  • For example, testing all specified requirements and fixing all defects found could still produce a system that is difficult to use but does not fulfill the users’ needs and expectations.

5. Testing is context-dependent

  • Testing is done differently in different contexts.
  • For example, testing in an Agile project is done differently than testing in a sequential software development lifecycle project.

6. Defects cluster together

  • This is the idea that certain components or modules of software usually contain the most number of issues or are responsible for most operational failures.
  • Testing, therefore, should be focused on these areas.

7. Beware of the pesticide paradox 

  • If the same tests are repeated over again and again, eventually these tests no longer find any new defects.
  • To detect new defects, existing test cases and test data may need changing, and new tests may need to be written.
  • Tests are no longer effective at finding defects, just as pesticides are no longer effective at killing insects after a while. In some cases, such as automated regression testing, the pesticide paradox has a beneficial outcome, which is the relatively low number of regression defects.