New:Socket for Asana Is Now Available.Learn more
Get Started

FsCheck

Package Overview
Dependencies
Maintainers
1
Versions
106
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

FsCheck

FsCheck is a tool for testing .NET programs automatically. You provide a specification of the program, in the form of properties which functions, methods or objects should satisfy, and FsCheck then tests that the properties hold in a large number of randomly generated cases. Such properties are actually a testable specification of your program. Properties are written in F#, C# or VB. FsCheck helps you to define properties, observe the distribution of test data, and define test data generators. Crucially, when a property fails, FsCheck automatically displays a minimal counter example.

nugetNuGet
Version
3.4.0
Version published
Total downloads
16M
Maintainers
1
Created
Source

FsCheck

FsCheck is a tool for testing .NET programs automatically. The programmer provides a specification of the program in the form of properties which functions, methods or objects should satisfy, and FsCheck then tests that the properties hold in a large number of randomly generated cases.

Quick Start

Install via NuGet:

dotnet add package FsCheck

Define a property as a function that returns bool:

open FsCheck

let revRevIsOrig (xs:list<int>) = List.rev(List.rev xs) = xs

Check.Quick revRevIsOrig

When a property fails, FsCheck automatically displays a minimal counter-example and shrinks it to find the simplest failure case.

Features

  • Automatic test case generation using property-based testing
  • Shrinking to find minimal counter-examples when tests fail
  • Composable generators to guide test data generation
  • Integration with NUnit, xUnit.NET, MSTest and other frameworks
  • Works with F#, C# and VB.NET

Documentation

For comprehensive documentation, visit https://fscheck.github.io/FsCheck/

License

FsCheck is licensed under the BSD 3-Clause license.

Keywords

test

FAQs

Package last updated on 20 Aug 2026

Related posts