Skip to content
SPECIFICTION
Get listed

FsCheck vs QCheck

FsCheck

fscheck.github.io

QCheck

github.com

Side by side

FigureFsCheckQCheck
Price fromFreeFree
Free planYesYes
Free trial——
Open source——
WindowsYes—
macOSYes—
LinuxYesYes
Plans published11
Spec score · Property-Based Testing Tools8.4 (#3)7.9 (#9)
CounterexamplesWhen a property fails, FsCheck displays a minimal counterexample.Generators can be paired with printers and shrinkers to display and minimize counterexamples when a property fails.
GeneratorsUsers can define custom test data generators and shrinkers, and package them together in Arbitrary instances.QCheck includes combinators for constructing random generators, including generators for lists, arrays, recursive types, algebraic types, and tuples.
InstallationFsCheck and its NUnit and xUnit.NET plugins can be installed from NuGet.QCheck can be installed through opam, and the README recommends qcheck-core for a minimal dependency set.
IntegrationsThe project documents integrations with xUnit.net and NUnit, and user-created integrations with Expecto, Fuchu, AutoFixture and MSTest.The project provides integration layers for OUnit and Alcotest, and the README describes using QCheck with Rely through an npm package.
LicenseThe project says its BSD license permits modification and redistribution for commercial and non-commercial purposes.The repository identifies its license as BSD-2-Clause and says the code is released under the BSD license.
PurposeFsCheck automatically tests .NET programs by checking properties against randomly generated cases.QCheck is a QuickCheck-inspired property-based testing library for OCaml.

Plans

FsCheck

  • FsCheckFree

FsCheck pricing →

QCheck

  • QCheckFree

QCheck pricing →

In their own words

FsCheck

FsCheck checks properties of.NET programs against randomly generated cases. Developers can express properties in F#, C# or VB, then run them with the built-in runner from an interactive session, a command-line program or a test framework. Integrations are documented for xUnit.net and NUnit, with user-created integrations for Expecto, Fuchu, AutoFixture and MSTest. When a property fails, FsCheck shrinks the input and shows a minimal counterexample. Developers can also define custom generators and shrinkers and group them in Arbitrary instances. The library supports parameterized cases and parallel execution, and its packages and NUnit and xUnit.NET plugins are available from NuGet. FsCheck is free: its listed plan is free, with a BSD license permitting commercial and non-commercial modification and redistribution. It runs on Linux, macOS and Windows. The project maintains version 3.x, but its documentation covers 2.x and is described as out of date and incomplete. Its model-based testing API is experimental and exempt from semantic-versioning guarantees.

Visit fscheck.github.io

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.

Visit github.com