3 ms·
Most posts about property-based testing focus on convincing the reader to do property-based tests and the mechanics of writing the tests. Unfortunately, I'm al
by shepmaster 4y ago
Most posts about property-based testing focus on convincing the reader to do property-based tests and the mechanics of writing the tests.
Unfortunately, I'm already convinced and know how to write the tests — what I wish I could find is some resource that would hone my ability to identify worthwhile properties. The best one I know of and go back to time and time again is https://fsharpforfunandprofit.com/posts/property-based-testing-2/ https://fsharpforfunandprofit.com/posts/property-based-testi..., but I really wish I could find more.
- chelmertz 4y agoHere are inspirational examples from properties of a video editor: https://wickstrom.tech/programming/2019/03/24/property-based-testing-in-a-screencast-editor-case-study-1.html https://wickstrom.tech/programming/2019/03/24/property-based... The author also published a tool for PBT:nif web front ends which sounds interesting.
- shepmaster 4y agoThanks! This page is familiar so I've definitely read it before, but didn't recall it when remembering examples. I like that it links to the site I provided; maybe I should try to search for other articles that also link there to find more inspiration.
- Jtsummers 4y agoI really liked Hebert's Property-Based Testing with PropEr, Erlang, and Elixir. It's in Erlang and Elixir, but the concepts transfer well to other languages and property-based test systems. https://pragprog.com/titles/fhproper/property-based-testing-with-proper-erlang-and-elixir/ https://pragprog.com/titles/fhproper/property-based-testing-...
- shepmaster 4y agoThanks; I've added that to my Christmas gift ideas!
- Folcon 4y agoI've had a good experience with this[0], however it seems Eric is not currently running it, if you're interested, email me, I can dig around and see if I can find my notes. Alternatively reach out to him in an email and see if he'll be willing to let you buy access. I personally found it a pretty good course where he had spent a reasonable amount of time coming up with both decent examples to highlight how it was going to work as well as create some nice rules of thumb as starting points to think about properties. -[0]: https://ericnormand.podia.com/beginning-property-based-testing-with-test-check https://ericnormand.podia.com/beginning-property-based-testi...
- travisjungroth 4y agoExplore abstract algebra[0]. It’s the study of algebraic structures, which are sets (types/classes) and operators (functions/methods) with axioms (properties). Also check out binary relations[1], part of order theory. [0] https://en.m.wikipedia.org/wiki/Abstract_algebra https://en.m.wikipedia.org/wiki/Abstract_algebra [1] https://en.m.wikipedia.org/wiki/Binary_relation https://en.m.wikipedia.org/wiki/Binary_relation