Search⌘ K
AI Features

Running the Test for Our API

Explore how to run tests for Elixir APIs using ExUnit, understanding the blend of process lifecycle and database persistence in testing. This lesson helps you create efficient tests that allow toggling persistence, leading to flexible and maintainable Elixir applications.

Properties of our tests

A test is like a scientific experiment. It does something using the codebase and then makes a series of measurements. In ExUnit, those experiments are function calls and the measurements are assertions. We’re not concerned about mixing several different kinds of assertions in the same test, especially for tests that are pretty ...