Writing Property Tests with ExUnit

Elixir makes testing a breeze using it’s testing framework ExUnit. ExUnit is a framework for writing unit tests that’s built in to every Elixir project. Every time you create a new project using mix new, Elixir will automatically create a test directory for you and populate it with a skeleton for writing unit tests for your project. ExUnit is already packaged with Elixir, so you don’t need to install any dependencies.

StreamData is an Elixir library for writing property-based tests. Property-based tests test the properties of a function to ensure your code meets some specified properties every time. Property-based tests are especially useful when your functions contain randomness, because you can write tests ...

Get Genetic Algorithms in Elixir now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.