Software testing is the process of checking whether an application is working as expected or not as it should, based on requirements.
Hence, there are fundamental principles or foundations in Software testing. These are:
- Testing shows the presence of defects
- Exhaustive testing is not possible
- Early testing
- Defect clustering
- Pesticide paradox
- Testing is context dependent
- Absence of errors fallacy
Let's explain 5 out of these principles.
- Pesticide Paradox: It states that if the same tests are repeated over and over again, eventually, the same set of test cases will no longer identify any new bugs in the system. In plain English, this means that as you run your tests multiple times, they stop being effective in catching bugs. Moreover, your existing tests will not catch part of the new defects introduced into the system and will be released onto the field.
- Testing is context dependent: Testing is context dependent which basically means that the way you test an e-commerce site will be different from the way you test a commercial off-the-shelf application. All the developed software is not identical. You might use different approaches, methodologies, techniques, and types of testing depending on the application type. For instance, testing, any POS system at a retail store will be different than testing an ATM machine.
- Early Testing: Testing should start as early as possible in the Software Development Life Cycle. So that any defects in the requirements or design phase are captured in the early stages. It is much cheaper to fix a Defect in the early stages of testing. But how early one should start testing? It is recommended that you start finding the bug the moment the requirements are defined.
- Defect Clustering: Defect Clustering states that a small number of modules contain most of the defects detected. This is the application of the Pareto Principle to software testing: approximately 80% of the problems are found in 20% of the modules. If the same tests are repeated over and over again, eventually the same test cases will no longer find new bugs.
- Absence of error fallacy: Software testing is not merely about finding defects, but also checking that software addresses the business needs. The absence of Error is a Fallacy i.e. Finding and fixing defects does not help if the system build is unusable and does not fulfill the user’s needs & requirements.