- Home
- Property-Based Testing Tools
- CsCheck
CsCheck
What it is
CsCheck is a free, self-hosted C# random testing library inspired by QuickCheck. Its composable Gen classes generate cases and shrink failures automatically without Arb classes; each shrunk case carries a seed that can reproduce the failure. Testing styles include random, model-based, metamorphic, performance, specification, regression, parallel, and equality testing. For concurrency, parallel tests compare behavior with possible linearizations and can shrink failing cases. Specification checks can either exhaustively enumerate reachable states or sample them, and can check whether declared faults are detected. The Faster function statistically compares methods and can run as a regular test across platforms. The README uses TUnit in its examples but says the tests 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 installation through the .NET CLI or PackageReference. The project notes that generic recursion limits AOT compatibility; its Dbg module is temporary and may change between minor versions.
For and against
For
- Shrinks generated failures automatically without Arb classes
- Seeds make shrunk failures reproducible
- Supports stateful, parallel, and specification testing
- Can be used with any testing framework
Against
- Generic recursion limits AOT compatibility
- Dbg API may change between minor versions
The verdict
CsCheck combines generated testing with several specialized approaches, including specification and parallel checks. Note its stated AOT limitation and the temporary status of the Dbg API.
Who it suits
CsCheck suits C# and F# developers who want generated tests, failure shrinking, and reproducible cases. Its range of testing styles may also suit teams checking stateful or concurrent behavior.
Plans and prices
CsCheck
Apache 2 · free forever
Read 4 Oct 2026 · github.com
On the record
- AOT caveat
- The project says CsCheck is close to being AOT compatible but generic recursion is a limitation.github.com · read 4 Oct 2026
- Concurrency
- Parallel testing compares results against possible linearizations and supports shrinking.github.com · read 4 Oct 2026
- Debug utility limitation
- The Dbg module is described as temporary debug functionality whose API may change between minor versions.github.com · read 4 Oct 2026
- Framework support
- The README says its example tests use TUnit but could equally be used in any testing framework.github.com · read 4 Oct 2026
- F# usage
- The project page reports 1,000+ F# tests using CsCheck in MKL.NET.github.com · read 4 Oct 2026
- Generators
- Its composable Gen classes support automatic shrinking without Arb classes.github.com · read 4 Oct 2026
- Installation
- NuGet lists CsCheck 4.9.1 and documents installation with the .NET CLI package command and PackageReference.nuget.org · read 4 Oct 2026
- Logging
- Sample supports logging types and pass and fail results for analysis, and the project includes a Tyche logging implementation.github.com · read 4 Oct 2026
- Performance testing
- Its Faster function statistically compares whether one method is faster than another and can be run as a normal test across platforms.github.com · read 4 Oct 2026
- Product
- CsCheck is a C# random testing library inspired by QuickCheck.github.com · read 4 Oct 2026
- Reproducibility
- Shrunk cases have a seed value that can be used to reproduce a failure.github.com · read 4 Oct 2026
- Security and reflection
- The project states that no reflection was used in making CsCheck.github.com · read 4 Oct 2026
- Specification checks
- Specification testing can exhaustively enumerate a reachable state space or sample it, and can check whether declared faults are caught.github.com · read 4 Oct 2026
- Support and contributions
- The README invites contributions through pull requests for new Gen classes or extensions.github.com · read 4 Oct 2026
- Testing styles
- The library supports random, model-based, metamorphic, performance, specification, regression, parallel, and equality testing.github.com · read 4 Oct 2026