Skip to main content

2 posts tagged with "testing"

View All Tags

Parallel Tests for Free

· 6 min read
Dave Rapin
Dave Rapin
Founder @ Curling IO
About this post

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.

Test Isolation for Free with SQLite

· 9 min read
Dave Rapin
Dave Rapin
Founder @ Curling IO
About this post

This is a technical implementation note about the testing architecture for Curling IO v3. It is written for software engineers and goes deeper into SQLite, in-memory databases, the backup API, and test isolation than our usual product posts.

Curling IO's tests don't need a shared test database, cleanup hooks, or transaction tricks. Each test gets its own database, so a test can pass alone or in the full suite for the same reason: nothing else can touch its data.

That falls out of one Version 3 choice: SQLite runs in-process. Each test gets a completely independent in-memory SQLite database, cloned from a template in microseconds using SQLite's backup API.