Principles of Software Testing. What are they?

Software testing principles

In this Post, we will discuss about basic principles of testing. These are basic fundamentals every tester should know .

principles

The image above describes the principles of testing which, form the basic steps towards delivering a successful product. Let us start with one by one in brief.

1. Testing shows presence of defects

A race bike reaches 100kmph in 10secs , but after delivery, customer reports that it accelerates even faster when brakes are applied :). Testing should focus on finding defects much before customers find them.

2. Exhaustive testing :Not possible:

Testing everything with all possible combinations of inputs and conditions is highly impossible.E.g, In a page there are 15 input fields, each having 5 possible values, then to test all the valid combinations you would need 30  517  578  125  (515) tests which would take around 45000 years.

3. Early testing:

In SDLC (Software development life cycle), testing activities should start as early as possible and should be focused on defined objectives. What if there is an error while gathering requirements which is the basis for next phase. That would result in loss. E.g, Login Id field for email – should accept only numerical values (an error in requirement capturing) What happens ?

4. Defect clustering:

A small number of modules contains most of the defects . if one defect is fixed , it may introduce another defect in the cluster (group).

5. Pesticide paradox:

If the same kinds of tests are repeated again and again, eventually the same set of test cases will no longer be able to find any new bugs. To overcome this “Pesticide Paradox”, it is really very important to review the test cases regularly. Thus, new and different tests need to be written to exercise different parts of the software or system to potentially find more defects.

Tests are like pesticides , spraying the same tests time and time again will make pesticides(defects) win.

6. Testing is context depending:

Testing is basically context dependent. Different kinds of sites are tested differently. For example, safety – critical software is tested differently from an e-commerce site like www.flipkart.com

7. Absence of error is fallacy:

Regardless of how many test cases are executed, we can never be 100% sure that no defects are left out. We can ensure that, Selection of test cases have higher likelihood of uncovering defects.

8. Defect prevention:

Defect prevention improves the quality of the process of the product , while defect detection and testing is needed to catch the defects that escaped in the process. More on this topic is covered under QA VS QC

9. Automation :

It requires careful planning , evaluation and training . Manual testing involves repetitive work  and should not be automated only for the sake of automation.In posts about automation, we have covered them in detail.