BurntSushi / quickcheck

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

Seed and print the value of seed used on failure #121

Closed Wilfred closed 8 years ago

Wilfred commented 8 years ago

I have tests that fail very rarely. When this happens on Travis, I'd really like to reproduce the issue locally.

If quickcheck randomly chose a seed, but printed that seed value on failure, then I could replicate test failures.

BurntSushi commented 8 years ago

Hmm. The failures should print the arguments with which the test ran. That should be sufficient to reproduce the failure?

Wilfred commented 8 years ago

You're right, that's totally sufficient. Sorry for the noise.

purew commented 6 years ago

For more complex test-input, it is not always that simple to refer to the debug output. It would be very useful if quickcheck could present reproducability steps on a failing test-case.

In the best of all worlds, giving a single one-liner that runs just the failing test-case with the failing test-input would be awesome.