haskell-hedgehog
haskell-hedgehog copied to clipboard
Anticipate Ctrl-C while running and show current test case information on quit
Sometimes you end up writing a test and it seems to be have been running for ages. You expect it to finish in a few seconds, but minutes later you're still sat at a partial output from your test runner. You hit ctrl-c
, but all the information that Hedgehog has discovered is lost!
It would be great if we could intercept Ctrl-C
and instead print out information about the currently running test case. For example, if we're shrinking, print the last known successful shrink - it might not be the best counter example, but it may well be good enough. We should also print the number of shrinks executed, because if the shrink is good enough, then maybe we need to add some prune
's to avoid shrinking any further in the future.
Yeah this has been painful for me too, agree it's a good idea