7 Principles of Software Testing
The 7 Principles of Software Testing are basic rules that guide how testing should be done effectively. These principles help testers understand the limitations and goals of testing.
7 Principles of Software Testing
1. Testing Shows Presence of Defects
Testing can show that bugs exist in the software, but it cannot prove that the software is completely bug-free.
Example:
Even if 100 tests pass, there may still be some hidden defects.
So testing reduces risk but does not guarantee 100% error-free software.
2. Exhaustive Testing is Impossible
It is impossible to test every possible input, condition, and scenario in a software application.
Example:
If a login field accepts millions of combinations of usernames and passwords, testing every combination is not practical.
Instead, testers use smart test cases and techniques.
3. Early Testing Saves Time and Cost
Testing should start as early as possible in the Software Development Life Cycle (SDLC).
Example:
Finding a bug during the design phase is cheaper than fixing it after the product is released.
Early testing reduces development cost and time.
4. Defect Clustering
Most defects are usually found in a small number of modules.
This is similar to the 80/20 rule (Pareto Principle):
80% of bugs are found in
20% of the software modules.
Testers focus more on these high-risk areas.
5. Pesticide Paradox
If the same test cases are repeated again and again, they will eventually stop finding new bugs.
Example:
Running the same login test repeatedly may miss other hidden issues.
Test cases should be regularly updated and improved.
6. Testing is Context Dependent
Different applications require different testing approaches.
Example:
Banking software needs security testing
Gaming software needs performance testing
E-commerce websites need usability testing
Testing strategy depends on the type of software.
7. Absence of Errors Fallacy
If software has no bugs but does not meet user requirements, it is still considered a failure.
Example:
A shopping app may work perfectly but if users cannot easily buy products, it fails its purpose.
Software must solve the user's problem, not just be bug-free.
Short trick to remember
P E E D P C A
P – Presence of defects
E – Exhaustive testing impossible
E – Early testing
D – Defect clustering
P – Pesticide paradox
C – Context dependent
A – Absence of errors fallacy
How these principles are asked in viva questions
1. Testing Shows Presence of Defects
Testing can show that bugs exist in the software.
But it cannot prove that the software is completely bug-free.2. Exhaustive Testing is Impossible
It is impossible to test all possible inputs and conditions.
Therefore testers select important test cases only.3. Early Testing
Testing should start early in the development process.
This helps reduce cost and fix bugs faster.4. Defect Clustering
Most defects are found in a small number of modules.
This follows the 80/20 rule (Pareto principle).5. Pesticide Paradox
Repeating the same test cases again and again will not find new bugs.
Test cases must be updated regularly.6. Testing is Context Dependent
Testing methods depend on the type of application.
Different software requires different testing approaches.7. Absence of Errors Fallacy
Even if software has no bugs, it may still fail.
If it does not meet user requirements, it is useless.Real example of each principle using Selenium testing (this will help you in interviews).1. Testing Shows Presence of Defects
Example: When testing a login page, you may find some bugs.
But even if tests pass, there may still be hidden bugs.2. Exhaustive Testing is Impossible
Example: A mobile app password field can have thousands of combinations.
It is impossible to test every possible password.3. Early Testing
Example: If a website design mistake is found early, it is easy to fix.
If found after development, it takes more time and cost.4. Defect Clustering
Example: In an online shopping website, most bugs may appear in the payment module.
Other parts like the homepage may have fewer bugs.5. Pesticide Paradox
Example: If testers only test the login page again and again, no new bugs will be found.
They must test other features like signup or password reset.6. Testing is Context Dependent
Example: A banking application focuses on security testing.
A gaming app focuses more on performance testing.7. Absence of Errors Fallacy
Example: A shopping website works without bugs.
But if users cannot easily buy products, the software still fails
Comments
Post a Comment