Friday 19 July 2013

Why Test cases must be designed ?

Need for Test Design:
Just like code is designed and developed, test cases also must be designed and then written. Since test design is required to derive at an optimal test suite which is of reasonable size and uncovers as many errors as possible. Also have to consider that randomly selecting or writing test cases does not provide effective testing.

Let's see an example of simple programming error.
If (X > Y) max = X;
Else max  = X;

Here, for the above program if we developed large test suite without design such as {(X=3, Y=2), (X=10, Y=1), (X=100, Y=0),(X=5,  Y=4) cannot going to detect any error. But if we have a design as that of small test suite {(X=3, Y=2), (X=5, Y=6)} can easily detect the error.

0 comments :

Post a Comment