We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
Understanding ExUnit's --seed Behavior
189
clicks

Source: elixirstreams.com
The article dives into the unexpected behavior of the `--seed` option in ExUnit, which is primarily known for randomizing the order of tests. The author shares a personal experience regarding a test that intermittently failed. After investigating, it was discovered that the `--seed` option not only affects test order but also seeds the random number generator used by functions like `Enum.random/1`. This behavior helps create consistent and reproducible test results even when randomness is involved.
Related posts
© HashMerge 2025