7 Principles of Software Testing

The success of any website or application is highly dependent on the quality of the software. Every developer needs to test the software before its release. Software testing is a vital part of the software development process. It enables the developers to fix the bugs and make the software more efficient. In this blog, we will discuss the seven main principles of software testing and their importance in the software development lifecycle.

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

If I told you that I have hidden a ball in this room. Then you searched for the ball but you didn’t find it. Does this mean that the ball doesn’t exist? Of course not. This just means that you failed to find the ball which is still existing in the room.

The same goes for software projects, testing the software and finding a little number of defects or finding no defects at all doesn’t mean that this software is bug-free. This just means that there are undiscovered defects in the software but we didn’t find them. And for this reason, thinking that software testing will find “all” defects in the software is a wrong perspective of software testing.

2) Exhaustive testing is impossible

It is not feasible to test all scenarios in any software project “this is why test techniques exist”. Imagine that you have a simple form with only one “Yes-No” question, exhaustive testing of this form requires only two test cases, the first tests the “Yes” button, and the second tests the “No” button. Sounds simple, right?

Principles of software testing | Example 1

But imagine that you have three “Yes-No” questions. In this case, we will need two to the power of three test cases which gives us a total of eight test cases to exhaustively test the form.

Principles of software testing | Example 2

But what if the form consists of 10 questions, each of which has 5 options “Extremely disagree – disagree – neutral – agree – strongly agree”.

Principles of software testing | Example 3

In this case, we will need 5 to the power of 10 test cases to exhaustively test the form which gives us more than 9 million test cases. Those 9 million test cases are required for only one form which is considered as a very simple section inside any website or mobile application.

So, to exhaustively test any project, we will need trillions of test cases only to functionally test the application.

3) Early testing saves time & money

We mentioned this principle earlier when we discussed the software development lifecycle models. It is always better to start testing activities as early as possible. Static testing should begin once the requirements are written. Dynamic testing should begin once the first piece of code is ready for testing.

4) Defects cluster together

Like we mentioned earlier, exhaustive testing is impossible. This is why we always think of ways to find as many defects using the least number of test cases. This principle helps us in achieving this goal.

Defects cluster together principle states that in any application, a small number of modules contains most of the defects in the software. Some people call this principle “Pareto principle” or “80-20 principle” because 80% of defects are in 20 % of modules.

Imagine that you are testing an online educational platform, in such a system most of the important defects will be present in functionalities like “Video streaming-Payment-Registration & login”. If defects in those three functionalities are solved, mostly the quality of such an application will be extremely high. So defect clustering helps us in managing our effort while testing our project.

5) Beware of the pesticide paradox

If you write test cases for an application, then execute them. When the developer solves defects reported by you, he will ask you to repeat the tests to find more defects in the same modules. In this case, if you repeat the same test cases, mostly you will not find any new defects in the software because you have already found defects that might be exposed by those scenarios. In this case, you need to write more test cases or use different types of testing to be able to expose more defects.

6) Testing is context-dependent

The way that you test a mobile application is different from the way that you test a website. The budget and time that you allocate for testing a gaming console game are much different from the time and budget that you allocate for testing a medical device that will help in diagnosing cancer. Not all projects are treated in the same way.

7) Absence of error is a fallacy

Do you remember Google+? It was supposed to be a competitor to Facebook. Why did this project fail? Did it include many defects? No. Did it have a bad user experience? No.

We know that projects fail because of having defects present in them but this is not the only reason for projects’ failure. You might have a very good testing team and they can improve the quality of the application but still, the application doesn’t succeed when presented to the market.

So finding and reporting many defects doesn’t guarantee the success of your project, there are many other factors “not related to software testing” that might be a reason for the success or failure of any project.

Conclusion

Software testing is a crucial part of the software development lifecycle that allows us to ensure that the software we create will be fit for purpose. We hope that this blog post has provided you with some great resources that can help you to understand the importance of software testing and to learn more about the different principles that drive software testing. 

Latest Posts