Thursday, May 18, 2006

Model-Based Testing

Some great articles by Harry Robinson:

http://www.geocities.com/model_based_testing/shoestring.htm

http://www.geocities.com/model_based_testing/intelligent.pdf

and the model-based testing web site in general:

http://www.geocities.com/model_based_testing/

Model-based testing is nothing new, and was basically first eluciated by Chin-Kuei Cho back in 1980 (An Introduction to Software Quality Control) and elaborated on in 1987 (Quality Programming: Developing and Testing Software with Statistical Quality Control).

The basic idea is fairly simple. You cannot test every path through a program, nor all inputs in all configurations for all possible outputs, because it is often (usually) infinite. You therefore have to model the processes of the software, and choose what specific inputs and configurations you want to use.

There are four basic methods of selecting sample test data:

1) Regular Sampling (each sample has an equal chance of being selected)
2) Weighted sampling (some regular samples mixed with some specially chosen samples that have more interesting characteristics)
3) Boundary Sampling (selecting boundaries for all samples)
4) Invalid Sampling (selecting some out-of-range samples to make sure the program correctly handles them.

I usually use all four. But I would usually run two separate tests: one with Invalid Sampling (a stress test) and one with Weighted Sampling that includes (Regular Samples, Boundary Samples, plus some other specially chosen samples.)

0 Comments:

Post a Comment

<< Home