dwyl/learn-elixir

Property Based Testing

Danwhy opened this issue · 3 comments

Property based tests are tests that assert certain properties are always satisfied by your code. Instead of just testing that your code works on one input, they provide a range of inputs, making sure the property is satisfied every time. This article is a good introduction to property based testing in general.

Property based testing is very popular among the functional language community, including Elixir.

Articles

Books

Videos

Property based testing in JavaScript with JSVerify:
https://hackernoon.com/property-based-testing-4330e3e77381

I'm not recommending that anyone write JS long term,
this is relevant to anyone who is not yet fluent in Elixir/Elm
or people who are stuck in JS-land for whatever reason.
see: https://github.com/jsverify/jsverify

"Testing shows the presence, not the absence of bugs". ~ Edsger W. Dijkstra