BurntSushi / quickcheck

Automated property based testing for Rust (with shrinking).
The Unlicense
2.4k stars 149 forks source link

Enable generator to be seeded via the environment #287

Open neithernut opened 3 years ago

neithernut commented 3 years ago

This change allows generators in a QuickCheck instance to be seeded via the environment. The main motivation is faithfully reproducing tests, i.e. with the same seeds. One common use-case would be automated bisects.

For example, a CI system could provide a seed which is stored alongside the report. In the case of failure, that seed could then be used for bisecting, eliminating the chance of falsely flagging a "bad" commit as "good" due to the randomness of input values.

This change is based on #278 (for Gen::from_seed).


What's still missing: