Fake
Fake is Haskell package for generating realistic-looking fake data.
Overview
The package has three main components:
- An analog to QuickCheck's Arbitrary and Gen that use realistic probability distributions rather than the more uniform distributions used by QuickCheck.
- A generic coverage function that generates full constructor coverage over a data type.
- A suite of providers for common types of data such as names, addresses, phone numbers, ID numbers, etc.
Fake's gcover
function is particularly useful with the armor
package for ensuring that all
constructors of your data types are tested for backwards compatible
serializations without having to write all the values yourself. This allows
you to get higher confidence that you have covered most of the important cases
without the combinatorial explosion of exhaustive testing.
Credits
Original inspiration came from the production needs of Formation (previously Takt).
Providers and other details inspired by similar packages in Python and Ruby.