diff --git a/lib/ex_unit/lib/ex_unit.ex b/lib/ex_unit/lib/ex_unit.ex index c244768ebe0..226b23b9f0c 100644 --- a/lib/ex_unit/lib/ex_unit.ex +++ b/lib/ex_unit/lib/ex_unit.ex @@ -274,7 +274,9 @@ defmodule ExUnit do * `:seed` - an integer seed value to randomize the test suite. This seed is also mixed with the test module and name to create a new unique seed on every test, which is automatically fed into the `:rand` module. This - provides randomness between tests, but predictable and reproducible results; + provides randomness between tests, but predictable and reproducible + results. A `:seed` of `0` will disable randomization and the tests in each + file will always run in the order that they were defined in; * `:slowest` - prints timing information for the N slowest tests. Running ExUnit with slow test reporting automatically runs in `trace` mode. It diff --git a/lib/mix/lib/mix/tasks/test.ex b/lib/mix/lib/mix/tasks/test.ex index 0c7854816a9..6287f592217 100644 --- a/lib/mix/lib/mix/tasks/test.ex +++ b/lib/mix/lib/mix/tasks/test.ex @@ -159,7 +159,8 @@ defmodule Mix.Tasks.Test do * `--raise` - raises if the test suite failed * `--seed` - seeds the random number generator used to randomize the order of tests; - `--seed 0` disables randomization + `--seed 0` disables randomization so the tests in a single file will always be ran + in the same order they were defined in * `--slowest` - prints timing information for the N slowest tests. Automatically sets `--trace` and `--preload-modules`