News for hackers. Stuff that matters.
Re:The Design and Use of QuickCheck by IanCal on Tuesday June 13, 2017 @05:44AM (#14543736)
> All determinism guarantees is that you'll either reliably detect a bug or reliably not detect a bug, and hence get a nice aesthetic line of green checkmarks followed by red crosses in your test history. Or just get a nice looking line of green and not even know the bug is there. This seems like a small thing to sacrifice to detect more bugs.

The situation you want to avoid is this:

Run tests, find bug.

Try and fix bug.

Rerun tests, tests pass.

Deploy fixes to production.

Later find out that the bug is not fixed, your second run of tests simply didn't hit the right combination.

Re:The Design and Use of QuickCheck by sethammons on Tuesday June 13, 2017 @07:37AM (#14544059)
We print the rand seed and allow tests to take a set seed. This allows us to use random generated data and still have deterministic results for reproducing failed cases.
Re:The Design and Use of QuickCheck by IanCal on Tuesday June 13, 2017 @08:53AM (#14544352)
Yep, this is a really useful approach, and I highly recommend anyone here who is thinking of trying this stuff out to take a note of the seed (or ensure it's printed) as the first time you realise you want to do this it's often too late!
Re:The Design and Use of QuickCheck by henrik_w on Tuesday June 13, 2017 @07:59AM (#14544136)
I've used the same technique when running randomly generated traffic when testing telecom systems. Very useful to be able to re-run the same random sequence!