The simplest option is to have different test files in your project, each of them using a different configuration that you specify during setup.
A more complex alternative is to have multiple test environments. MIX_ENV=test_foo, MIX_ENV=test_bar and so on. And then specify config/test_foo.exs, config/test_bar.exs and so on. That's what Ecto uses to test multiple adapters/databases. The only issue is that Elixir will compile your project per environment but you can set that to false as build_per_environment: false in your mix.exs. There are probably many options between those two, it is hard to say which one works better without more details. *José Valim* www.plataformatec.com.br Skype: jv.ptec Founder and Director of R&D On Wed, May 18, 2016 at 4:11 AM, Jorge Díaz <[email protected]> wrote: > Hi everyone, > > Let's say I'm building a SDK for a certain XML-based protocol which can be > consumed from several providers and I really need to do my integration > testing to check with several of them and not only one. This means I need > to hit several hosts and build expectations based on getting a valid > responses form them. I know it's a bit unusual integration testing pattern > but the whole point here about having an SDK is to provide isolation of the > multiple issues with each of them (i.e. SOAP vs. non-SOAP). > > I would like to cover this scenario while doing a proper use of ExUnit. Is > it possible to launch a set of tests several times each of them loading a > different config using Mix.Config from a file? > > I'm quite new to Elixir so any clue at any level is welcome. :) > > Cheers! > Jorge > > -- > You received this message because you are subscribed to the Google Groups > "elixir-lang-talk" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elixir-lang-talk/170c2cd9-c0f7-49ca-8f1e-14c965410fe7%40googlegroups.com > <https://groups.google.com/d/msgid/elixir-lang-talk/170c2cd9-c0f7-49ca-8f1e-14c965410fe7%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "elixir-lang-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-talk/CAGnRm4Jy9a7w4Zj4kt-7TaN0iYz8bOgRhm_irmxOxvk0L%2BZdVA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
