. .


Bringing Theories to SUnit

September 14, 2011 13:11:37.000

This sounds really interesting:

The good fellows in Haskell land came up with a nice idea one day: instead of relying on a programmer writing well-thought out tests, with test data designed to flush out edge cases, they realised that people aren’t very good at finding bugs in their own code. The real world is too random, too crazy, to leave us alone. Things break in production for reasons we would never anticipate. So why don’t we, as part of our testing process, throw some randomness at our tests? So that’s just what QuickCheck does. You specify a property - something you hold to be true for all your Foos - and QuickCheck will test your property by generating test cases. If it finds a counterexample, it figures out a minimal version of that counterexample and prints it out.

Developers not only make mistakes, you often hear people say that "there's no time for testing". This looks like it would lend a hand in both cases.

Technorati Tags:

posted by James Robertson

 Share Tweet This