Brussels / 3 & 4 February 2024


Property based testing in Elixir

As developers, we write unit tests in a TDD-style workflow for validating the behavior of our applications and libraries. However, all possible situations need to be manually thought out when writing the tests for the code. Property based testing aims to solve this by allowing the developer to specify behavior of their programs in terms of properties (invariants) of their code and then automatically generating tests that check if the property is indeed valid. In this talk, the key concepts of property based testing will be explained, along with clarifying examples, ranging from introductory snippets to more complex ‘real life’ scenarios. The examples will be written in Elixir; a functional programming language that runs on the Erlang virtual machine. The high level, flexible and expressive nature of the language make it an ideal fit for declaring properties against which a program can be checked.


Photo of Tonći Tonći