-
Notifications
You must be signed in to change notification settings - Fork 129
Open
Labels
Description
Right now the only conventient way to control how long a test runs for in QuickCheck is by modifying maxSuccess in one way or another. However, this is a bit inconvenient when setting up test suites (e.g. hspec) whose properties vary a lot in execution time.
It would be nice to have a flag (e.g. maxTestTime) that tells QuickCheck "please keep testing for this long" to avoid having to set different maxSuccess for different tests (and, more importantly, having to go through the slow and boring process of measuring execution time to figure out what it should be for each individual test!).
There are a couple of questions that need to be resolved when designing this feature, however:
- How should it interact with
withMaxSuccess?- The name
maxSuccessaside the semantics ofwithMaxSuccessis currently that other things (checkCoverage) can make the tests run for more tests thanmaxSuccessand in keeping with this it would probably be correct to keep the same semantics here: run for the maximum of the allocated time and the givenmaxSuccess.
- The name
- How should it interact with
checkCoverage?- I think the right solution is probably to do what we do with
maxSuccessand keep going even if the coverage checker is happy.
- I think the right solution is probably to do what we do with