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

Property-based testing in a nutshell

Property-based testing in a nutshell

Talk given at Cork Ministry of Test

jub0bs

July 13, 2017
Tweet

More Decks by jub0bs

Other Decks in Programming

Transcript

  1. We want to make sure the tests pull their weight

    by making them expressive, so that we can tell what's important when we read them and when they fail, and by making sure they don’t become a maintenance drag themselves. Nat Pryce & Steve Freeman (GOOS book, p227)
  2. Property-based tests… • raise the level of abstraction • increase

    your confidence in the system under test • reduce the maintenance burden of your tests • free you to focus on quality attributes other than correctness
  3. The whole point is that [production code and testing code]

    double-check on each other. You have a problem when something goes red because they are mismatched. The basic, fundamental thing is that it’s a double-check mechanism. Martin Fowler (https://www.youtube.com/watch? v=dGtasFJnUxI&t=23m)