FsCheck
FsCheck is a .NET property-based testing library that generates input values and checks whether specified properties hold for them.
Functional Programming in C#, Second Edition
FsCheck is a .NET property-based testing framework that generates test inputs and runs tests against them.
- How it is used
- Checks laws such as the applicative law by running parameterized tests over randomly generated inputs.
- How deep it goes
- Defines property tests and demonstrates applicative-law testing with custom Option generation, while deferring detailed discussion of the underlying laws.
- Examples
- Tests the applicative law with integers and Option values, including a generator that produces Some or None.
- What you can do after
- Apply FsCheck to test an applicative law across generated inputs, including custom Option generation.
Read how Functional Programming in C#, Second Edition explains FsCheck →
F# in Action: A Revised Edition of Get Programming with F#
FsCheck is a .NET library for property-based testing that generates input values and checks properties against them.
- How it is used
- Deploys property-based testing when conventional unit tests provide insufficient confidence in code correctness.
- How deep it goes
- Explains property-based testing through generated inputs, increasing complexity, and combined input-output properties.
- Examples
- Uses flipCase, the input "Hello," and progressively varied strings to contrast explicit tests with properties.
- What you can do after
- Apply it via FsCheck to evaluate correctness across many generated inputs instead of relying on a few hand-selected cases.
Read how F# in Action: A Revised Edition of Get Programming with F# explains FsCheck →
Related concepts
- property-based testinguses · Property-based testing is a software-testing technique that checks whether specified general properties hold across varied, often automatically generated, inputs.
- test data generationconfigured by · Test data generation is the creation of input data or fixtures according to defined rules for exercising and validating software.
- pseudo-random number generatoruses · A pseudorandom number generator is a deterministic algorithm that uses an initial seed or internal state to produce a sequence of values with random-like properties.
Questions about FsCheck
What is FsCheck?
FsCheck is a .NET property-based testing library that generates input values and checks whether specified properties hold for them.
Which Manning books explain FsCheck?
Functional Programming in C#, Second Edition and F# in Action: A Revised Edition of Get Programming with F#.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

