# Elixir Level 13: Testing

> Level 13: Testing of the LoWisa Elixir course: ExUnit, Concurrent Testing, Property-Based Testing Concepts. 3 lessons and 9 ideas, each explained in one line.

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

## 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

- **Before:** [Level 12: Data & State](/courses/elixir/level-12-data-and-state/): ETS, Persistent Data Concepts, Concurrent State Architecture.
- **Next:** [Level 14: Performance & BEAM](/courses/elixir/level-14-performance-and-beam/): Scheduler and Processes, Memory and Profiling, Production BEAM Performance.

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](/help/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.

---

Source: https://lowisa.dev/courses/elixir/level-13-testing/ · Updated 2026-11-25
