Skip to content
SPECIFICTION
Get listed

FsCheck

fscheck.github.io

Free plan WindowsmacOSLinux

What it is

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.

Spec sheet

Purpose
FsCheck automatically tests .NET programs by checking properties against randomly generated cases.Read 7 Oct 2026 · fscheck.github.io
Audience
FsCheck is for developers who want to test properties of .NET programs with generated inputs.Read 7 Oct 2026 · fscheck.github.io
Integrations
The project documents integrations with xUnit.net and NUnit, and user-created integrations with Expecto, Fuchu, AutoFixture and MSTest.Read 7 Oct 2026 · fscheck.github.io
Support
The project invites users to report issues on GitHub and says contributors may open issues about documentation problems or gaps.Read 7 Oct 2026 · fscheck.github.io
License
The project says its BSD license permits modification and redistribution for commercial and non-commercial purposes.Read 7 Oct 2026 · fscheck.github.io
C# limitation
The documented function for expecting exceptions is not available in the C# API.Read 7 Oct 2026 · fscheck.github.io
Counterexamples
When a property fails, FsCheck displays a minimal counterexample.Read 7 Oct 2026 · fscheck.github.io
Current documentation
The project says its 2.x documentation is out of date and incomplete, while version 3.x is maintained and receives new features and fixes.Read 7 Oct 2026 · fscheck.github.io
Documentation status
The site warns that its documentation covers version 2.x while version 3.x is maintained and receives new features and fixes.Read 7 Oct 2026 · fscheck.github.io
Experimental feature
The experimental model-based testing API is exempt from semantic versioning guarantees, so minor releases may break code using it.Read 7 Oct 2026 · fscheck.github.io
Failure reports
When a property fails, FsCheck displays a minimal counterexample by shrinking the failing input.Read 7 Oct 2026 · fscheck.github.io
Generators
Users can define custom test data generators and shrinkers, and package them together in Arbitrary instances.Read 7 Oct 2026 · fscheck.github.io
Installation
FsCheck and its NUnit and xUnit.NET plugins can be installed from NuGet.Read 7 Oct 2026 · fscheck.github.io
Languages
Properties can be expressed in F#, C# or VB.Read 7 Oct 2026 · fscheck.github.io
Property limitation
Properties cannot have generic types; the documentation says type annotations can be used to resolve types.Read 7 Oct 2026 · fscheck.github.io
Stateful testing
Model-based testing for stateful systems and objects is in the Experimental namespace, where semantic-versioning promises do not apply.Read 7 Oct 2026 · fscheck.github.io
Test runner
FsCheck includes a built-in runner usable from F# or C# Interactive, command-line programs, or a test framework.Read 7 Oct 2026 · fscheck.github.io
Testing modes
FsCheck includes a built-in test runner and can run properties from F# or C# interactive, command-line programs or test frameworks.Read 7 Oct 2026 · fscheck.github.io

Plans and prices

FsCheck Free BSD-licensed library · NuGet packages Read 7 Oct 2026 · fscheck.github.io

Every FsCheck plan and price →

Strong points and limits

Strong points

  • Free plan listed at free
  • Runs on Linux, macOS and Windows
  • Shows a minimal counterexample when a property fails
  • Supports custom generators, shrinkers and Arbitrary instances
  • Built-in runner and documented test-framework integrations

Limits

  • Documentation covers out-of-date, incomplete version 2.x
  • Experimental model-based API has no semantic-versioning guarantees
  • Properties cannot have generic types
  • C# API lacks the documented exception-expectation function

Who it suits

FsCheck suits developers who want generated-input property checks for .NET programs, with properties written in F#, C# or VB. Its built-in runner and documented framework integrations offer several ways to run checks.

FsCheck in depth

Read the full write-up

Overview

FsCheck is a property-based testing library for.NET, best suited to developers who want generated inputs to probe rules across F#, C# or VB programs. Its appeal is practical: it can expose awkward edge cases and shrink a failure to a smaller counterexample, but the developer still has to define useful properties.

Custom generators and shrinkers can be packaged together in Arbitrary instances, giving teams control over both test data and failure reduction. FsCheck also supports parameterized cases and parallel execution. Its BSD license permits modification and redistribution for commercial and non-commercial use.

Key features

Generated property checks: FsCheck tests stated properties against randomly generated cases. This suits rules expected to hold across a broad range of inputs; it complements rather than replaces hand-picked examples.

Shrinking: When a check fails, FsCheck reduces the failing input and reports a minimal counterexample. That can make a discovered edge case more tractable to diagnose than the original generated case.

Custom generators: Teams can define generators and shrinkers and bundle them in Arbitrary instances. This is useful when default test data does not reflect the shapes the program needs to handle.

Runner and integrations: A built-in runner works from F# or C# Interactive, command-line programs, or test frameworks. The project documents xUnit.net and NUnit integrations, alongside user-created integrations for Expecto, Fuchu, AutoFixture and MSTest.

Stateful testing: Model-based testing for stateful systems and objects is in the Experimental namespace. Its code is not covered by semantic-versioning guarantees, so minor releases may require changes.

Pricing

FsCheck — free. The free plan provides the BSD-licensed library through NuGet packages, including the NUnit and xUnit.NET plugins. There is no paid tier or trial to weigh against it. The license permits commercial use, modification and redistribution.

Platforms

FsCheck supports Linux, macOS and Windows. Properties can be expressed in F#, C# or VB. NuGet installation and the built-in runner give teams several ways to bring checks into a.NET workflow, whether they run them interactively, from a command line or through a test framework.

Who it's for

FsCheck fits.NET developers who can state behaviors as properties and want generated inputs to challenge those rules. It is particularly useful when custom data shapes or smaller failure examples matter. Teams that depend on current, complete documentation should account for the project's warning that its 2.x documentation is out of date and incomplete, while version 3.x is maintained and receives new features and fixes.

There are also API constraints to consider: properties cannot have generic types, though type annotations can resolve types. The documented function for expecting exceptions is unavailable in the C# API, which may matter to teams writing properties in C#.

Pros and cons

Pro — focused failure reports: Shrinking reduces a failing generated input to a minimal counterexample, helping narrow down the behavior that breaks a property.

Pro — flexible integration: The built-in runner and documented framework integrations let teams run properties in several.NET testing contexts.

Pro — commercial freedom: The BSD license permits commercial as well as non-commercial modification and redistribution.

Con — documentation mismatch: The 2.x documentation is out of date and incomplete even as 3.x continues to receive fixes and features, so adoption may involve reconciling guidance with the maintained version.

Con — API gaps and experimental status: Generic properties are unsupported, exception expectations lack a documented C# API, and stateful model-based testing may break across minor releases.

Alternatives

Readers comparing property-based approaches can browse Property-Based Testing Tools; those choosing a broader testing framework can compare Unit Testing Frameworks.

Racket QuickCheck is a free option for Racket, requiring Racket v6.0 or newer.

ScalaCheck is a free BSD-3-Clause library for readers working in Scala.

Gopter is a free MIT-licensed Go property-testing library.

JSVerify is a free open-source JavaScript property-based testing library.

Hypothesis is another free option for readers comparing property-testing tools.

PropCheck is a free MIT-licensed Ruby gem requiring Ruby 2.5.1 or newer.

QCheck is a free BSD-2-Clause OCaml property-based testing library.

fast-check is a free MIT-licensed JavaScript and TypeScript option.

Verdict

Choose FsCheck if you need free property-based checks for.NET and value generated cases, custom data generation and minimized failures across F#, C# or VB. Its main reason to look elsewhere is the combination of dated 2.x documentation and API limits, particularly for generic properties or C# exception expectations; stateful testing also carries experimental compatibility risk.

Verdict

FsCheck offers a free way to check .NET properties with generated inputs, shrinking and multiple runner options. Readers should account for the 2.x documentation and the limits around generic properties, C# exception expectations and experimental stateful testing.

Where Specifiction places it

Alternatives to FsCheckAll alternatives →