Property Testing in Elixir

There are a number of property testing frameworks available for the Elixir ecosystem.

PropEr is the obvious one from the book.

StreamData is the custom build Elixir version that was almost added to ex_unit.

Of late I have found StreamData to be very useful. Add some property tests and your bugs become very easy to find.

I have even started to experiment with minimal property tests.
Call the function with all possible inputs and assert that the output is valid.
This is what Typecheck is trying to do, but that requires you to add annotations to all of your types, which does not yet work well with some other libraries.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s