dwyl / learn-elixir

:droplet: Learn the Elixir programming language to build functional, fast, scalable and maintainable web applications!
1.6k stars 107 forks source link

Property Based Testing #93

Open Danwhy opened 5 years ago

Danwhy commented 5 years ago

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

nelsonic commented 5 years ago

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

Danwhy commented 5 years ago

ElixirConf 2018 - Picking Properties to Test in Property Based Testing - Michael Stalker

Danwhy commented 5 years ago

Guide coming soon: https://github.com/dwyl/learn-property-based-testing