Clojure/West 2014. Slides to accompany https://www.youtube.com/watch?v=JMhNINPo__g.
Unit-testing is a common tool for gaining confidence in code correctness. However, the benefit from these tests is often linear to the number of hand-written test-cases. test.check (formerly simple-check) is a property-based testing tool based on QuickCheck, which allows for thousands of tests with constant effort.
Tests are written as universal quantifications -- properties which should hold true for all input. test.check then randomly generates test cases, for which the property should pass. In this talk, we'll take a look at the foundations of test.check, implementation details regarding shrinking, and see sophisticated tests of concurrent and non-deterministic code.