Tests and Code Coverage
In the past fifteen years, we’ve seen a tremendous growth in automated software testing. Elixir embraces this trend. Rather than give you a deep dive into any single tool, we’re going to walk you through a few important ones that will help ease your adoption.
ExUnit
Elixir ships with a unit testing framework called ExUnit.[17] Based on longstanding principles, it serves as the basic building block for almost all other Elixir testing frameworks.
The Elixir community expects applications and libraries to be well tested. We’ll not give you more than a brief overview here, but we will touch on some ExUnit basics:
-
Tests are a series of scripts that mix discovers and runs based on their name.
-
Each test runs a flow of setup, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access