Next: Summary
Up: Less Team oriented White
Previous: Loop Testing
The last important white box testing method
discussed here is domain testing. The goal is to check values taken by
a variable, a condition, or an index, and to prove that they are
outside the specified or valid range. It also contains checking that
the program acepts only valid input , because it is
unlikely to get reasonable results if idiocy has been entered.
Colloquially, this part can be called ``garbage in -- garbage out''
testing.
The following checks are suggested by Michael Krüger
[Krüger90] and Glenford J. Myers [Myers79]:
- Have all variables used been initialized correctly?
- Are all indices used to access an array inside the array's
dimensions?
- Are all those indices integers
? - Are all arguments in a comparison of the same type?
- Are all boolean expressions correct? Check logical operands like
AND, and OR, and their priorities.
- Are there any ``off by one'' situations, like a loop which is
executed too often, or a field index of an array which is increased by
one?
Certainly, this list is by far not complete, but it gives a good
impression of possible faults. It is known from experience that, if
programs pass most of this tests, the number of bugs found by other tests
is, according to expectations, lots lower.
Concluding this section is an example set of values which might be used
to check a variable that contains a percentage. Keep in mind that the
borders are of particular interest:
-4.00, -0.00, +0.00, 17.56, 100.00, 100.01, 102.25
Ingo Melzer
Mon Aug 5 15:12:01 MET DST 1996