Kudzu is a library that throws test cases at your property tests until the code coverage no longer increases.
Property testing has no feedback loop, you randomly choose a number of test cases and hope for the best.
How do you know if your property tests were any good? The best feedback I know is to use hpc and look at the pretty colored HTML output to see what code was exercised.
But wait, why do I have to look at the output? Isn't that why we have computers?
In Haskell, you can get code coverage results while your program is running!
The simplest feedback loop is to keep running random tests until new code coverage stops increasing.
- add kudzu to your test-suite depends,
- import the
Kudzu
module - call the testUntil function of your choice
- run with
cabal test --enable-coverage
The best write up of this idea is Random Test Generation, Coverage Based.
- support HedgeHog
- support QuickCheck
- support LeanCheck
- figure out how to use Kudzu on Kudzu without looping forever
You can see kudzu in use in the tests for takedouble