Vinicius Brasil

April 12, 2021

The right way of running child app tests in an Elixir umbrella

When you mix test your umbrella, you end up running the entire test suite. Even though

mix test apps/child_app/test/child_app_test.exs # don't 😢

technically works, it is still running from inside the umbrella app so this command runs for every app inside the umbrella.

To run child app tests in an Elixir umbrella, use mix cmd using --app, for example:

$ mix cmd --app child_app mix test test/child_app/child_app_test.exs # do 😀

About Vinicius Brasil

Building cool stuff with Elixir, OTP and Ruby. Majoring in Theology and musician.