Learn about 7 principles in software testing and related examples

Tram Ho

The following tutorial will introduce 7 basic principles in software testing that all software testers from basic to advanced should know. In conducting software testing, the most important thing is that you achieve optimal results without deviating from your original goal. To ensure that you don’t deviate from the goal, you need to follow a basic testing principle. The following are seven common testing principles that are widely applied in software testing. To learn this, let’s look at a simple scenario when you perform a file move from Folder A to Folder B.

Think about all the ways you can check this out.

In addition to the usual scenarios, you can also check the following conditions:

  • You are trying to move the file when it is open
  • You do not have security permissions to paste files into Folder B
  • Folder B is on the shared drive and the storage capacity is full.
  • Directory B already has a file with the same name, in fact, this list is endless
  • Or suppose you have 15 input fields to test, each field has 5 available values, the number of combinations to be tested will be 5 ^ 15

If you want to check the entire project combined can PERFORMANCE TIME & COST will increase exponentially. We need certain guidelines and strategies to optimize testing efforts

Here are 7 principles:

Testing all is impossible

Yes! Testing all is impossible. Instead, we need to choose to enforce the most important types of testing based on risk analysis as well as the importance and priority of testing.

And the million dollar question is, how do you identify this risk?

To answer this, what do you think is likely to cause your operating system to fail?

I’m sure most of you will guess, open all 10 different applications at once.

So, if you are testing this OS, you will realize that errors can be found in multi-tasking operations and need to be thoroughly tested, which brings us to the next principle. : Cluster of errors

Cluster error

During the testing process, we will be able to easily observe that most of the errors found are usually related to only a few features of the system. This is the application of the Pareto Principle for software testing: about 80% of problems are found in 20% of the system’s features.

According to experience, you can identify such risky features. But this method also has its own problems.

If similar tests are repeated many times, the same test cases will no longer find new errors.

Pesticide paradox

Repeated use of the same pesticide to kill insects during farming will over time lead to insects developing resistance to pesticides. Therefore, insecticides on insects are not effective. The same applies to software testing. If a test case is repeated many times, it will not make sense to detect new errors.

To overcome this, test cases need to be reviewed & revised regularly, adding new & different test cases to help find more errors.

Testers cannot simply depend on existing testing techniques. We must constantly improve existing methods to test more effectively. But even after testing this sweat and effort, you can never confirm that your product has no errors. To demonstrate this point, let’s see this video about the public launch of Windows 98

You think a company like MICROSOFT will not test their operating system thoroughly and will risk their reputation just to see their operating system crash during the public launch!

Test proves the presence of an error

Therefore, the test principle states that – Testing only proves the presence of an error and cannot prove that the product has no errors. That is, Software Testing reduces the probability that the error has not been detected in software but even if no error is found, it is not proof of accuracy. But if, you work harder, take all precautions and make your software product without 99% error. And the software does not meet the needs & requirements of customers. This leads us to the next principle, which states that – Absence of Error

The absence of errors

It is possible that the software without 99% error is still unusable. This may be the case if the system is thoroughly tested for false requests. Software testing is not only about finding errors, but also of checking whether the software meets business needs. The absence of Error is a mistake, ie finding and fixing errors does not help if the system build is not available and does not meet the needs & requirements of users.

To solve this problem, the next test principle states that Testing is early

Early testing

Testing should start as soon as possible in the Software Development Life Cycle. Therefore, any errors in requirements or design phases are captured in the early stages. It’s much cheaper to fix an error in the early stages of testing. But how to start testing early? You should start finding errors as soon as the request is determined. More about this principle in a later training guide.

Tests depend on context

Tests depend on context, which basically means how you test your ecommerce site will be different from how you check out the app. All software developed is not the same. You can use a different approach, method, technique and test type depending on the type of application. For example testing, any POS system at retail stores will be different from ATM testing.

Summary of seven inspection principles

Principle 1 Test shows the presence of error Principle 2 Comprehensive testing is impossible Principle 3 Early testing Principle 4 Error cluster Principle 5 Pesticide paradox Principle 6 Test is dependent on Context Principle 7 Absence of errors

Concept: “The principle is for reference only. I will not use them in practice. “

This is very false. The test principle will help you create an effective Test Strategy and draft error checking cases.

But learning the test principles is like learning to drive for the first time.

Initially, while you learn to drive, you pay attention to everything and everything like gearshift, speed, clutch handling, etc. But with experience, you only focus on driving the rest yourself Of course. Thus, you even organize conversations with other passengers in the car.

The same is true for testing principles. Experienced testers have summarized these principles to the extent that they apply them even without thinking. Therefore, the notion that principles are not used in practice is simply not true.

Share the news now

Source : viblo.asia