QCheck vs QuickCheck
QCheck
github.comQuickCheck
hackage.haskell.orgSide by side
| Figure | QCheck | QuickCheck |
|---|---|---|
| Price from | Free | Free |
| Free plan | Yes | Yes |
| Free trial | — | — |
| Open source | — | — |
| Linux | Yes | Yes |
| Plans published | 1 | 1 |
| Spec score · Property-Based Testing Tools | 7.9 (#9) | 7.3 (#16) |
| Generators | QCheck includes combinators for constructing random generators, including generators for lists, arrays, recursive types, algebraic types, and tuples. | QuickCheck provides combinators for defining test data generators. |
| License | The repository identifies its license as BSD-2-Clause and says the code is released under the BSD license. | The package is licensed under BSD-3-Clause. |
| Purpose | QCheck is a QuickCheck-inspired property-based testing library for OCaml. | QuickCheck is a Haskell library for random testing of program properties by checking specifications against randomly generated cases. |
Plans
In their own words
QCheck
QCheck is a property-based testing library for OCaml, inspired by QuickCheck. Rather than relying only on hand-picked examples, it provides combinators to generate values such as lists, arrays, tuples, recursive types, and algebraic types for checking properties. When a check fails, generators can be paired with printers and shrinkers to show and reduce counterexamples. QCheck2 builds shrinking into its generators, though the project describes that API as less battle-tested than QCheck. The package family includes qcheck-core, qcheck-ounit, qcheck-alcotest, qcheck, and ppx_deriving_qcheck; the last can derive generators from type declarations. Runner options include QCheck_base_runner in qcheck-core and QCheck_runner with OUnit compatibility in qcheck, with integration layers for OUnit and Alcotest. The project also points to qcheck-stm for sequential and parallel model-based tests and qcheck-lin for sequential consistency testing. Installation is available through opam, and the source can be built with make. The minimal qcheck-core package depends only on unix and dune. QCheck is free and licensed under BSD-2-Clause.
QuickCheck
QuickCheck is a free Haskell library for testing program properties against randomly generated cases. Developers write specifications with QuickCheck combinators and can use combinators to define test-data generators and inspect generated-data distributions. It supports stateful testing, reproducible failures and shrinking failing cases. Monadic property testing is provided through the Test.QuickCheck.Monadic module. The package README describes adding QuickCheck to project dependencies for use in tests or a REPL. A companion package, quickcheck-instances, supplies instances for types in Haskell Platform packages, with additional dependencies. QuickCheck is licensed under BSD-3-Clause and lists dependencies including base, containers, random, splitmix, template-haskell and transformers. Hackage reports it tested with GHC versions from 8.10 up to but not including 9.15, as well as Hugs. A make-hugs script creates a Hugs-compatible version and may be useful for other non-GHC implementations. Hackage lists QuickCheck-2.18.0.0 as a downloadable Cabal source package. The listed package plan costs nothing.