Manage test dependencies in umbrella projects

Giving a project split in multiple umbrella apps for business logic separation. I have a questions regarding DRY in test configuration.
I try to work TDD style and I need to run tests on every change. For this I use mix_test_watch and ex_unit_notifier.
If I put this dependencies in global mix project then when I go to one of the umbrella apps I do not have access to it.
My only solution was to put this dependencies in each umbrella app and configure test_helper for each of them like this:

{:mix_test_watch, "~> 0.3",   only: :dev, runtime: false},
{:ex_unit_notifier, "~> 0.1", only: :test}

And also add this to each test_helper.exs:

ExUnit.configure formatters: [ExUnit.CLIFormatter, ExUnitNotifier]

This does not seem too dry for me since I have to add and manage versions for each umbrella app.
I am wondering if there is another approach?

One of the ideas behind splitting a larger application into an umbrella app with multiple smaller apps is that each of them can (potentially) implement its internal logic independently from the others. This is why I think it makes sense that each application needs to define its own dependencies.

When installing umbrella app dependencies, by default, all of them will share the same mix.lock and deps folder anyways. So there isn’t much managing that you will have to do here :slight_smile:

I have to add this test dependencies to each app. Then when I want to upgrade them to have the latest version I need to change the mix file for each one.
I can run:

mix deps.update --all

but if I want to impose a required version for mix_test_watch I need to update each mix file.

I can live with this approach but it does not seem too dry. Since I have 6 umbrella apps I had to do some copy pasting.

@silviurosu Did you ever come to any other conclusion on this problem? To be perfectly honest, I don’t mind the cost of copying for the benefit of isolating the apps, but just wondering if you came across a more idiomatic way of doing things.

Hi Steven,
At the moment I have a small script that I run to add this general setup for each umbrella app. Since they are isolated and need to run independently I do not see other solution for now. I am satisfied with the results even though some dependencies and configuration files are the same in all of them.

Great - thanks for the reply.