CsCheck
github.com
- Free plan
- Self-hosted
What CsCheck is
CsCheck is a free C# random testing library inspired by QuickCheck, intended for self-hosted use. Its composable Gen classes support automatic shrinking without Arb classes, and shrunk cases carry a seed that can be used to reproduce a failure. The library covers random, model-based, metamorphic, performance, specification, regression, parallel, and equality testing. Parallel testing compares results with possible linearizations and supports shrinking. Specification checks can enumerate a reachable state space exhaustively or sample it, and can check whether declared faults are caught. Its Faster function statistically compares methods to assess which is faster and can run as a regular test across platforms. The README examples use TUnit, though the project says CsCheck can be used with any testing framework. The project page reports more than 1,000 F# tests using CsCheck in MKL.NET. NuGet lists version 4.9.1 and documents installation through the .NET CLI or PackageReference. The project notes that generic recursion limits AOT compatibility. Its Dbg module is temporary debug functionality whose API may change between minor versions.
Who it suits
CsCheck suits C# and F# developers who want random, stateful, or specification-based testing and reproducible shrunk failures. It can be used with TUnit or another testing framework.
Good to know, and what to watch
- Automatic shrinking without Arb classes
- Shrunk cases include reproducible seeds
- Supports multiple testing styles
- Parallel tests compare possible linearizations
- Can run with any testing framework
- Generic recursion limits AOT compatibility
- The Dbg API may change between minor versions
- The library is listed for self-hosted use
Plans
Every plan and priceCsCheck
Free plan
The verdict
CsCheck brings shrinking and reproducible failures to a wide set of testing styles. Review its AOT caveat and temporary Dbg API before relying on those areas.
What the maker publishes
- AOT caveat
- The project says CsCheck is close to being AOT compatible but generic recursion is a limitation. source
- Concurrency
- Parallel testing compares results against possible linearizations and supports shrinking. source
- Debug utility limitation
- The Dbg module is described as temporary debug functionality whose API may change between minor versions. source
- Framework support
- The README says its example tests use TUnit but could equally be used in any testing framework. source
- F# usage
- The project page reports 1,000+ F# tests using CsCheck in MKL.NET. source
- Generators
- Its composable Gen classes support automatic shrinking without Arb classes. source
- Installation
- NuGet lists CsCheck 4.9.1 and documents installation with the .NET CLI package command and PackageReference. source
- Logging
- Sample supports logging types and pass and fail results for analysis, and the project includes a Tyche logging implementation. source
- Performance testing
- Its Faster function statistically compares whether one method is faster than another and can be run as a normal test across platforms. source
- Product
- CsCheck is a C# random testing library inspired by QuickCheck. source
- Reproducibility
- Shrunk cases have a seed value that can be used to reproduce a failure. source
- Security and reflection
- The project states that no reflection was used in making CsCheck. source
- Specification checks
- Specification testing can exhaustively enumerate a reachable state space or sample it, and can check whether declared faults are caught. source
- Support and contributions
- The README invites contributions through pull requests for new Gen classes or extensions. source
- Testing styles
- The library supports random, model-based, metamorphic, performance, specification, regression, parallel, and equality testing. source
Checked against the maker's pages on 4 Oct 2026.