[prev] [index] [next]

Automating Testing

Testing is a systematic, time-consuming, repetitive process.

Fact of life:   if we rely on humans to do testing, they won't do it (properly).

So ... automate testing as much as possible

  • make the machine do the boring, repetitive tasks
  • we concentrate on selecting test data and interpreting results
Very simple example, to test a sorting program mysort

$ ./mysort < data1 > data2
$ ./mysort < data2 > data3
$ diff data2 data3

Even if we know nothing about the data files, we know that data2 and data3 should be identical.