Elixir course

Elixir Level 13: Testing

Testing is level 13 of 16 of the LoWisa Elixir course. It has 3 lessons and 9 ideas. Below is every lesson and what it teaches, in one line each.

Updated 2026-11-25

ExUnit

  • ExUnit. ExUnit is built in: test blocks with assertions, run by mix test on every change.
  • describe and setup. describe groups related tests; setup builds shared context per test honestly.
  • Doctests again. Doctests pull examples into the suite: the docs proven with every run.

Concurrent Testing

  • async tests. ExUnit runs test files async when they share nothing: suites that finish in seconds.
  • Message assertions. assert_receive waits for expected messages: concurrency tested by protocol, not sleeps.
  • Sandboxed state. Shared resources get per-test sandboxes: isolation keeping async honest.

Property-Based Testing Concepts

  • Properties. Property tests state invariants: encode|>decode is identity: over generated inputs.
  • StreamData. StreamData generates shaped random data: thousands of cases you did not imagine.
  • Shrinking. Failures shrink to minimal counterexamples: the bug at its smallest, handed to you.

Before and after this level

In the app each of these ideas is taught and then asked back, and the level ends with a checkpoint and flashcards. See Checkpoints and flashcards.

Frequently asked questions

What does Elixir Level 13: Testing cover?

ExUnit, Concurrent Testing, Property-Based Testing Concepts: 3 lessons and 9 ideas.

What should I know before this level?

The level before it, Level 12: Data & State, which covers ETS, Persistent Data Concepts, Concurrent State Architecture.

Learn Elixir on your phone

The first level is free. LoWisa is on Google Play and the App Store.