Skip to the content
Know your tech before you buy it. Makers: get listed from $49/mo

FsCheck

fscheck.github.io

  • Free plan
  • Windows
  • macOS
  • Linux
7.7 Club score Visit fscheck.github.io

What FsCheck is

FsCheck is a free library for automatically checking properties of .NET programs against randomly generated cases. Developers can express properties in F#, C#, or VB and run them with its built-in runner from an interactive session, command-line program, or test framework. The project documents integrations with xUnit.net and NUnit, as well as user-created integrations for Expecto, Fuchu, AutoFixture, and MSTest.

When a property fails, FsCheck shrinks the failing input and displays a minimal counterexample. Developers can create custom generators and shrinkers and package them in Arbitrary instances. FsCheck packages, including its NUnit and xUnit.NET plugins, are available from NuGet. The project’s BSD license permits modification and redistribution for commercial and non-commercial purposes.

The project says version 3.x is maintained and receives new features and fixes, while its documentation covers version 2.x and is out of date and incomplete. Stateful model-based testing is experimental and is not covered by semantic-versioning guarantees. Properties cannot have generic types, and the documented function for expecting exceptions is not available in the C# API.

Who it suits

FsCheck is for developers who want to check properties of .NET programs using generated inputs. It suits teams using F#, C#, or VB and a supported or user-created test integration.

Good to know, and what to watch

  • Generates random cases and shrinks failures to counterexamples.
  • Supports properties written in F#, C#, or VB.
  • Allows custom generators and shrinkers.
  • Documents xUnit.net and NUnit integrations.
  • BSD license allows commercial and non-commercial redistribution.
  • Documentation covers outdated, incomplete version 2.x.
  • Stateful model-based testing is experimental.
  • Properties cannot have generic types.
  • C# API lacks the documented exception-expectation function.

FsCheck

Free

Free plan

Getting started

  1. Open the FsCheck website
  2. Install FsCheck from NuGet
  3. Install the NUnit or xUnit.NET plugin when needed
  4. Define properties in F#, C#, or VB
  5. Run properties through F# or C# Interactive, a command-line program, or a test framework

Limits to check

FsCheck is a free BSD-licensed library. Documented constraints include no generic property types; the experimental stateful API has no semantic-versioning guarantees, and the C# API omits the documented exception-expectation function.

The verdict

FsCheck offers property-based checks for .NET, with custom data generation and compact failure examples. Check the version 3.x documentation status and experimental limits if you plan to use stateful model-based testing.

Questions people ask

How much does FsCheck cost?

FsCheck is free, with a listed price of free plan.

Which languages can express FsCheck properties?

Properties can be written in F#, C#, or VB.

Where can FsCheck run?

FsCheck supports Linux, macOS, and Windows.

How are FsCheck packages installed?

FsCheck and its NUnit and xUnit.NET plugins can be installed from NuGet.

What happens when a property fails?

FsCheck shrinks the failing input and displays a minimal counterexample.

Is FsCheck open source?

The project uses a BSD license that permits modification and redistribution for commercial and non-commercial purposes.

What the maker publishes

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

Checked against the maker's pages on 7 Oct 2026.