Fake is a Haskell package for generating realistic-looking fake data.
The package has three main components:
- Analogs 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.
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.
Original inspiration came from the production needs of Formation (previously Takt).