|
|
|
|
|
by mc_
2360 days ago
|
|
We have a fair bit of property tests in KAZOO now, using PropEr[0], an open source implementation in Erlang. Fred (of Learn You Some Erlang) wrote a great book/site[1] on property testing in Erlang and Elixir, well worth the price of the book. I find property testing is a muscle; the more time I can spend writing them, the "better" I get at writing useful tests. But the muscle atrophies quickly for me, so having the existing tests helps speed up getting into the mindset again. I think the model checking (proper_statem in the PropEr code) is the real winner though. We can model a part of our system, write state transitions and then test those against both the model and a running system and compare our results. Any discrepancy points to either the model or the system being wrong (which is its own joy/pain to figure out). [0] https://github.com/proper-testing/proper [1] https://propertesting.com/ |
|