QuickCheck: Automatic testing of Haskell programs
This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.
QuickCheck is a library for random testing of program properties. The programmer provides a specification of the program, in the form of properties which functions should satisfy, and QuickCheck then tests that the properties hold in a large number of randomly generated cases. Specifications are expressed in Haskell, using combinators provided by QuickCheck. QuickCheck provides combinators to define properties, observe the distribution of test data, and define test data generators.
Most of QuickCheck's functionality is exported by the main Test.QuickCheck module. The main exception is the monadic property testing library in Test.QuickCheck.Monadic.
If you are new to QuickCheck, you can try looking at the following resources:
The official QuickCheck manual. It's a bit out-of-date in some details and doesn't cover newer QuickCheck features, but is still full of good advice.
https://begriffs.com/posts/2017-01-14-design-use-quickcheck.html, a detailed tutorial written by a user of QuickCheck.
The quickcheck-instances companion package provides instances for types in Haskell Platform packages at the cost of additional dependencies.
[Skip to Readme]
Properties
Modules
[Index] [Quick Jump]
- Test
- Test.QuickCheck
- Test.QuickCheck.All
- Test.QuickCheck.Arbitrary
- Test.QuickCheck.Exception
- Test.QuickCheck.Features
- Test.QuickCheck.Function
- Test.QuickCheck.Gen
- Test.QuickCheck.Modifiers
- Test.QuickCheck.Monadic
- Test.QuickCheck.Poly
- Test.QuickCheck.Property
- Test.QuickCheck.Random
- Test.QuickCheck.State
- Test.QuickCheck.Test
- Test.QuickCheck.Text
- Test.QuickCheck
Flags
Automatic Flags
Name | Description | Default |
---|---|---|
templatehaskell | Build Test.QuickCheck.All, which uses Template Haskell. | Enabled |
Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info
Downloads
- QuickCheck-2.12.5.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
Package maintainers
For package maintainers and hackage trustees