Start Elixir ExUnit test from console
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# You can use it to build eflame graph. | |
# | |
# First: iex console should be started with `iex -S mix test /test/suite/feature_test.exs` | |
# | |
# I would be glad if you can help me with test compilation part from console | |
# so we don't have to autocompile the test with `mix test` | |
# | |
# Then in promtp you can enter to run the ex_unit test: | |
test_modules = [YourProject.Suite.FeatureTest] | |
ExUnit.configure([after_suite: []]) | |
{:ok, _} = Application.ensure_all_started(:ex_unit) | |
Enum.each(test_modules, &ExUnit.Server.add_sync_module/1) | |
time = ExUnit.Server.modules_loaded() | |
ExUnit.configuration() |> Keyword.take([:max_cases, :seed, :trace]) |> ExUnit.configure() | |
options = ExUnit.configuration() | |
ExUnit.Runner.run(options, time) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment