Tuesday, December 12, 2006

Boundary Value Testing

Boundary value testing is an extension of equivalence class testing. But rather than testing just one of the values in the class you test the upper and lower values of the class as well as the value above and below that value. Since most programs have a significant behavior change at boundaries it is always good to make sure that you have the correct behavior at the boundaries. This is more thorough than equivalence class testing and will find a lot of the off-by-one errors in the product.

Some steps to setup Boundary value tests.

  1. Identify the equivalence classes.
  2. Identify the boundaries of each equivalence class.
  3. For each boundary, write one test case for one unit below the boundary, on the boundary, and one unit above the boundary.
  4. The one unit above and below may create duplicate tests. If this is the case just run the test once, and note the results.

Some of the positive aspects of this type of testing are:

  1. You focus on problematic areas in the system.
  2. You cover both valid and invalid cases.
  3. You have a relatively small test set.
  4. You can use this style of testing with non-functional requirements like performance and capacity.

There is only one problem with Boundary Testing is that in some cases it is hard to come up with appropriate boundary values.

Boundary value testing is rather simple and is one of the few testing strategies that has more good things to say about it then bad.

No comments: