What is exhaustive testing?

Exhaustive testing is a technique used in software development that tests all possible combinations of a data set. This sort of testing is used to ensure that the program does not crash under any circumstance. It belongs to the category of quality assurance testing.

The illustration below describes the process of exhaustive testing:

The concept of exhaustive testing

Exhaustive testing may sometimes not be possible practically while carrying out testing. This can be because the total number of possible combinations is too big, and it is not computationally feasible to test all of them.

Exhaustive testing tests all possible scenarios. A program rarely passes all of them. However, some bugs might occur rarely and are therefore termed as low-priority bugs. Other bugs might occur for a certain population of users only. Exhaustive testing provides a bigger picture of all the possible scenarios that can arise within a program. A program that passes an exhaustive test is robust and able to handle all situations.

Advantages of exhaustive testing

Exhaustive testing has the following advantages:

  • Tests can be automated, and thus no manual effort is involved.
  • Tests the entire sample space of a data set.
  • Makes a program robust by identifying any error that can arise.
  • High-priority tasks that can occur repeatedly will be tested for sure.
  • Improves customer satisfaction with the product.

Example

We can consider a password of seven characters that can have alphabets (both lowercase and uppercase) and numbers only. Repetition is allowed as well. The total possible combinations will be 62762^{7}. Therefore, exhaustive testing will test all possible passwords to report a bug. As we can see, this is a big number for a simple example. As we make examples more complex, the possible combinations increase exponentially.

Copyright ©2024 Educative, Inc. All rights reserved