02 Boundary Value Testing - skylerto/Software-Testing GitHub Wiki

Boundary Value Testing

Input domain testing is the most commonly taught (and perhaps the most commonly used) software testing technique. We will see a number of approaches to input domain testing. We will then study some of its limitations.

Boundary Value Analysis

In the BVA technique, for each of our input variables we select 5 values. These values include:

  • Minimum (min)
  • Just Above min (min+)
  • Nominal (nom)
  • Just below Max (max-)
  • Maximum (max)

Single Fault Assumptions

Failures are only rarely the result of the simultaneous occurrences of two (or more) faults. We generate test cases as such for all i where i represents values of all but one variable x_i at nominal. x_i assumes all 5 values presented above.

Advantages

  • Independent variables
  • Single fault assumption
  • Physical quantities.

Limitations

  • Does not work well for boolean variables as they only have either a yes, or a no answer.
  • Does not work well for logical variables, PIN (transaction type).
  • When variables are not independent (i.e. dependent).

BVT Extensions

Robustness Testing

A simple extension to BVA where we add 2 more values per variable, max+ and min- (little larger than max, little smaller than min). The expected output is usually an error message while the system recovers. Implementing these test cases may not be possible.

Worst Case Testing

Rejects the single fault assumption and tests all combinations of values. Instead of 4n+1 test cases, we have 5^n. Often leads to a large number of test cases with low bug-finding power. Usually better to apply special value testing: test cases based on the tester's intuition.

Robust worst case testing

Add the values min- and max+ to the possible variable values. Now take all combinations of variable values.

Special value testing

Use best engineering judgment (intuition, domain knowledge, experience, and soft spots).

Random testing

Select random values for each variable.