way to state properties of functions 2. Gives you a way to declare how to generate arbitrary values of your types 3. Provides generators for standard types (usually) 4. Attempts to falsify your properties and reports counterexamples.
Incomplete list: https://en.wikipedia.org/wiki/QuickCheck Some decent or popular implementations are missing Python: pyqcy Java: Functional Java (fj.test)
in less time ($$$) Relieves developer of burden of finding and manually writing tests for corner cases Properties are meaningful documentation The best test data is random test data, but. . . a bit of domain-specific non-randomness is sometimes useful examples still have their place.
data Check that property holds for all values Supports existential properties Available in several languages SmallCheck (Haskell), smallcheck4scala, autocheck (C++), ocamlcheck, python-doublecheck
languages have theorem-proving capabilities Properties become theorems; no proof, no program Program extraction to other languages Completeness proofs rev example: http://is.gd/EhanO1
Programs (2000) Koen Claessen, John Hughes: http://is.gd/mpsY7G Automated Unit Testing your Java using ScalaCheck by Tony Morris: http://is.gd/j0R7qq UCSD CSE 230 lecture: http://is.gd/0YfxOr QuickCheck: Beyond the Basics by Dave Laing: http://is.gd/pGKnhg Recommended Haskell learning path: https://github.com/bitemyapp/learnhaskell
licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/. Feedback http://devconf.cz/f/72 Slides https://github.com/frasertweedale/talks/ Email [email protected] Twitter @hackuador