Property based testing in the Functional Paradigm

(written by lawrence krubner, however indented passages are often quotes). You can contact lawrence at:


Which brings me to another killer feature of many functional languages: property-based testing (PBT). While PBT is by no means an exclusive domain of functional languages, it does have deep roots in Haskell in the form of QuickCheck. What sets PBT apart from its traditional unit and integration brethren is its emphasis on defining a set of properties that describe a function and ability to generate a lot of random test cases to attempt to falsify these specifications. This is especially useful if you are concerned about test coverage and effectiveness as PBT allows you to focus on what requirements a function should fulfil while leaving the test cases that cover different permutations and edge cases to the framework.