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, ...
Get Adopting 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.