Accelerating Elixir Tests

This is an article on running elixir tests without a project.

The problem I am trying to solve is to have a true isolated unit test that does not require the entire project to be built. Given a suitably large codebase the tests can take 30+ seconds to start due to rebuilding the world. This is painful if you are only working on something that is isolated from the rest of the system.

The main trick is to use the elixir cli tool to run just what you need without requiring all the heavy details from the project.

This is a project that shows off using this technique.

Even on a trivial project you get some speed ups locally ./first-test.sh was twice as fast as mix test