When are unit test framemworks useful?

  • When there is a framework available for your language
  • When your program is split into "units"

These points did not obtain in this case. I was writing a simple Perl program, about 130 lines long. I did not bother to break it out into objects.

On the other hand, the tested program was going to be used in an automated system. I wanted to test all circumstances that might crash it and catch them. This included problems with command-line input, input files, and output files. I wanted to test from the command line, and shell scripts make that easy.

read more