Question

I'm using cabal to build and test my projects with the commands:

cabal configure --enable-tests
cabal build
cabal test

As a framework I use testing-framework (https://batterseapower.github.io/test-framework/). Everything works, however the number of QuickCheck-tests defaults to 50 which in my use-case is very little because I have to filter the generated data to fit certain properties.

Is there any possibility to pass something like

--maximum-generated-tests=5000

to the test-executable via cabal? I tried things like

 cabal test --test-options='maximum-generated-tests=5000'

but no luck so far. Is there any possibility to achieve this?

Many thanks in advance!

jules

Was it helpful?

Solution

You missed the dashes:

cabal test --test-options=--maximum-generated-tests=5000

Also, if too few generated tests satisfy your property, you may have better luck with SmallCheck. It's not random and thus will find all inputs satisfying the condition in the given search space. (Disclosure: I'm the maintainer of SmallCheck.)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top