Understanding ExUnit's --seed Behavior

125
clicks
Understanding ExUnit's --seed Behavior

Source: elixirstreams.com

Type: Video

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.

© HashMerge 2024