Including ExUnit in a release to use Wallaby

I’m using the following library: GitHub - elixir-wallaby/wallaby: Concurrent browser tests with elixir

However, this library is meant for testing only and calls ExUnit functions directly. I’m using it as a regular WebDriver library to interact with the Chrome WebDriver, so I need it to run outside just the test environment.

However, even when using the following to include ExUnit in the release: applications: [ex_unit: :permanent], when I run the release, I get this error:

18:15:03.703 [info]  Application wallaby exited: Wallaby.start(:normal, []) returned an error: shutdown: failed to start child: Wallaby.SessionStore
    ** (EXIT) an exception was raised:
        ** (UndefinedFunctionError) function ExUnit.after_suite/1 is undefined (module ExUnit is not available)
            ExUnit.after_suite(#Function<0.96164278/1 in Wallaby.SessionStore.init/1>)
            (wallaby 0.28.0) lib/wallaby/session_store.ex:41: Wallaby.SessionStore.init/1
            (stdlib 3.14) gen_server.erl:417: :gen_server.init_it/2
            (stdlib 3.14) gen_server.erl:385: :gen_server.init_it/6
            (stdlib 3.14) proc_lib.erl:226: :proc_lib.init_p_do_apply/3

Does anyone know the proper way of including ExUnit in a release to sidestep this issue?

Nevermind, had some other settings wrong, the solution of including ExUnit explicitly works :slight_smile:

@jswny could you share your configuration? What worked for you?

Been a while since I used this for a very very rough vaccine finder notification service, but here’s the config that worked for me: vaxer/mix.exs at master · jswny/vaxer · GitHub