Parallel Tests for Free
This is a technical implementation note from the development of Curling IO v3. It is written for software engineers and goes deeper into Gleam, Erlang, EUnit, test isolation, and parallel execution than our usual product posts.
While writing the previous post about our per-test SQLite databases, I was describing how each test gets its own in-memory database, no shared connections, no shared state. And I thought: wait, if nothing is shared, can we just run them all at the same time?
Turns out we could, and our server test suite went from ~4 seconds to ~0.85 seconds for around 800 tests. Zero code changes to the tests themselves. One 25-line Erlang module.