Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Lunch & Learn - Property Based Testing

Lunch & Learn - Property Based Testing

Mickael Metesreau

December 21, 2016
Tweet

More Decks by Mickael Metesreau

Other Decks in Programming

Transcript

  1. Could be Strong The total is the sum of the

    elements The answer is always 42 …
  2. But most of the time, it’s weak The appointment is

    always in the future The invoice is never negative …
  3. Generator: easily generates a number of random values for many

    types Shrinker: tries to find the mininal counter example that still fails the property
  4. Thanks QuickCheck: A Lightweight Tool for Random Testing of Haskell

    Programs http://www.cs.tufts.edu/~nr/cs257/archive/john-hughes/quick.pdf An introduction to property-based testing http://fsharpforfunandprofit.com/posts/property-based-testing/ FsCheck https://fscheck.github.io/FsCheck/