Elixir Test Output

Elixir has been designed taking inspiration from a number of other languages. This makes the developer experience to be one of the best available. This includes test runner support and the ever useful mix utility that hosts everything from project creation, dependency management, database migrations and repl support.

One feature that is slightly lagging is the test output support. Previously I had worked in Groovy using Gradle and Spock. The test output report was spectacular. You could generate a detailed report artifact, which was either a directory of html or a single zip file containg the same. This report would list all of the test suites with the ability to see the associated console output with the test. This becomes great to have in a CI setup as these can cheaply be stored in S3 which allows detailed investigation of historical failed test runs.

The following provides the hooks to improve the Elixir story. I have been considering writing one that produces a livebook as the output.


Here is a sample project that uses some of the above techniques:


Currently the project will add the name of the current project before the summary line of tests passed and failed.
The idea being that an umbrella project could report which project it was. This can make life a bit easier when dealing with a build server that only shows a limited span around failures.

Warning this does not work in an umbrella project.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s