I wrote one particular Erlang regression test program called regtest.erl along these lines. The idea is first to execute a large and complex program on a lot of inputs and to record what happens in log files, then to test the logs from separate runs for equivalence. If the consequences in the logs are the same before and after my hacking then I know the overall behaviour is substantially the same.
Lately I write small programs like this any time I want to rewrite important code that has no explicit test suite. I'm finding it very useful!