If you have some inside knowledge about how the data is physically organized,
you may be able to identify some hidden boundaries. For example, if an overflow
storage block is used when more than 255 characters are entered into a field, the
boundary value tests would include 255 and 256 characters in that field. This may
be verging on white-box testing, since we have some knowledge of how the data is
structured, but it doesn
’t matter how we classify things as long as our testing is
effective at finding defects. Don
’t get hung up on a fine distinction – just do
whatever testing makes sense, based on what you know. An old Chinese proverb
says,
‘It doesn’t matter whether the cat is white or black; all that matters is that the
cat catches mice
’.
With boundary value analysis, we think of the boundary as a dividing line
between two things. Hence we have a value on each side of the boundary (but the
boundary itself is not a value).
Invalid
Valid
Invalid
0 1
99 100
Looking at the values for our printer example, 0 is in an invalid partition, 1 and
99 are in the valid partition and 100 is in the other invalid partition. So the boundary
is between the values of 0 and 1, and between the values of 99 and 100. There is a
school of thought that regards an actual value as a boundary value. By tradition,
these are the values in the valid partition (i.e. the values specified). This approach
then requires three values for every boundary, so you would have 0, 1 and 2 for the
left boundary, and 98, 99 and 100 for the right boundary in this example. The
boundary values are said to be
‘on and either side of the boundary’ and the value
that is
‘on’ the boundary is generally taken to be in the valid partition.
Note that Beizer talks about domain testing, a generalization of equivalence
Chia sẻ với bạn bè của bạn: