in reply to Generating Tests

You should take a look at Test::LectroTest which lets you write specification-based tests. It implements a language for specifying domains for test arguments, and will perform probabilistic testing by selecting valid combinations of arguments based on your constraints.