Testing with ExUnit
From the beginning, Elixir was developed with ExUnit, the test framework, as part of the core library. As a result, most of the test tooling we’ve come to utilize in our production applications is straight out of the Elixir core. This means that if you have Elixir and you’re familiar with what’s available, you can write effective tests without needing to bring in other libraries.
To learn how to use ExUnit, we’re going to start by writing our first test and then discuss some test theory, specifically the stages of testing. We’ll look at how to organize test files and then explore using common Elixir to help maximize the effectiveness of our tests. Finally, we’ll cover how to design code so that it’s well organized and easy ...
Get Testing Elixir now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.