5 ms·
You might find these useful: https://hypothesis.works/articles/rule-based-stateful-testing/ https://hypothesis.works/articles/rule-based-stateful-testin... ht
by felixyz 8y ago
You might find these useful:
https://hypothesis.works/articles/rule-based-stateful-testing/ https://hypothesis.works/articles/rule-based-stateful-testin...
http://propertesting.com/book_stateful_properties.html http://propertesting.com/book_stateful_properties.html
For a long time, I felt the same way you describe: all introductions to property-based testing show you things like testing a function that reverses a list and yes it all looks very useful and nifty, but it's hard to imagine how to formulate interesting variants for more complex code. These two posts were the first to really give me a fuller picture and lots of practical strategies:
https://fsharpforfunandprofit.com/posts/property-based-testing/ https://fsharpforfunandprofit.com/posts/property-based-testi...
https://fsharpforfunandprofit.com/posts/property-based-testing-2/ https://fsharpforfunandprofit.com/posts/property-based-testi...
(In general, everything I've ready/watched by Scott Wlaschin has been super helpful, and I've never written a line of F#.)
- sametmax 8y agoThanks a lot. This is why I still use HN :)
- felixyz 8y agoThis was my very first comment on HN. You made my day :)
- sametmax 8y agoJust read it. Never heard of fsharpforfunandprofit before. Never touched f# either. But damn, that's good.
- kragen 8y agoWelcome!
- thefifthsetpin 8y agoWelcome!
- curuinor 8y agofred hebert (monocqc) has his actual book out just now on Amazon, iirc https://www.amazon.com/gp/product/1680506218 https://www.amazon.com/gp/product/1680506218