proptest-rs / proptest

Hypothesis-like property testing for Rust
Apache License 2.0
1.69k stars 158 forks source link

Option to print seed value of failing test #358

Open gz opened 1 year ago

gz commented 1 year ago

It would be nice if on a failure proptest could (optionally) also print the proptest random seed value used in this run.

My use-case is: I'm running randomized tests in CI that sometimes fail. The CI system cleans up the checkout directory after failure (and not everyone has access to CI). So I don't have a good way to get the seed value for a failed test. Right now I have to manually build a test-case for the failing minimal example so I can reproduce it locally and fix it. If the seed value would be printed I could just import that and check it in for the future too.