BadSeed
Stores and reuses ExUnit seeds from failing test runs.
How it works
Whenever a test run finishes unsuccesfully, BadSeed will store the used seed in
a file in the project's directory named _build/test/.bad_seed. When the suite
is run again, it'll automatically reuse that seed. If a test run passes with
that seed, _build/test/.bad_seed is removed to allow ExUnit to generate random
seeds again.
Installation
-
Add bad_seed to your list of dependencies in
mix.exs:
def deps do
[
{:bad_seed, "~> 0.1.0", only: :test}
]
end-
Call
BadSeed.setup()intest/test_helper.exs:
BadSeed.setup()
ExUnit.start()- Run your tests like normal.