Enable concurrent browser tests with Phoenix.Ecto.SQL.Sandbox
mainTo run acceptance tests (using tools like Hound or Wallaby) concurrently with a headless browser, use the Phoenix.Ecto.SQL.Sandbox plug. This requires PostgreSQL.
Set a configuration flag in
config/test.exs:config :your_app, sql_sandbox: trueConditionally add the plug to your
Endpointinlib/your_app/endpoint.ex. It must be placed before any plug that accesses the database (e.g.,plug YourApp.Router).
if Application.get_env(:your_app, :sql_sandbox) do
plug Phoenix.Ecto.SQL.Sandbox
end