[Haskell-cafe] [Haskell] [ANN] GenCheck - a generalized property-based testing framework

Henning Thielemann lemming at henning-thielemann.de
Wed Jun 20 12:56:55 CEST 2012


On Tue, 19 Jun 2012, Jacques Carette wrote:

> Its main novel features are:
>
> * introduces a number of /testing strategies/ and /strategy combinators/
> * introduces a variety of test execution methods
> * guarantees uniform sampling (at each rank) for the random strategy
> * guarantees both uniqueness and coverage of all structures for the
>   exhaustive strategy
> * introduces an /extreme/ strategy for testing unbalanced structures
> * also introduces a /uniform/ strategy which does uniform sampling
>   along an enumeration
> * allows different strategies to be mixed; for example one can
>   exhaustively test all binary trees up to a certain size, filled with
>   random integers.
> * complete separation between properties, generators, testing
>   strategies and test execution methods


This sounds very interesting to me since I had a lot of trouble with 
changed test case distributions when switching from QuickCheck-1 to 
QuickCheck-2. It was mainly that tested numbers became much bigger in 
QuickCheck-2 and if I used the numbers as size of lists, then tests could 
not be run in reasonable time anymore. Thus I think more control over 
test-case generation is necessary.

QuickCheck is Haskell-98 and thus is very portable. I see that GenCheck 
needs some more extensions - type families, multi-parameter type classes, 
what else?



More information about the Haskell-Cafe mailing list