FsCheck.NUnit
3.4.0
dotnet add package FsCheck.NUnit --version 3.4.0
NuGet\Install-Package FsCheck.NUnit -Version 3.4.0
<PackageReference Include="FsCheck.NUnit" Version="3.4.0" />
<PackageVersion Include="FsCheck.NUnit" Version="3.4.0" />
<PackageReference Include="FsCheck.NUnit" />
paket add FsCheck.NUnit --version 3.4.0
#r "nuget: FsCheck.NUnit, 3.4.0"
#:package FsCheck.NUnit@3.4.0
#addin nuget:?package=FsCheck.NUnit&version=3.4.0
#tool nuget:?package=FsCheck.NUnit&version=3.4.0
FsCheck.NUnit
FsCheck.NUnit integrates FsCheck with NUnit by adding a FsCheckPropertyAttribute that runs FsCheck tests, similar to NUnit's TestAttribute.
Quick Start
Install via NuGet:
dotnet add package FsCheck.NUnit
Define a test class with FsCheck properties:
open NUnit.Framework
open FsCheck
open FsCheck.NUnit
[<TestFixture>]
type ListProperties() =
[<FsCheckProperty>]
member _.``Reverse of reverse is identity`` (xs:list<int>) =
List.rev(List.rev xs) = xs
[<FsCheckProperty>]
member _.``List length unchanged after reverse`` (xs:list<int>) =
List.length (List.rev xs) = List.length xs
Or in C#:
using NUnit.Framework;
using FsCheck;
using FsCheck.NUnit;
[TestFixture]
public class ListProperties
{
[FsCheckProperty]
public void ReverseOfReverseIsIdentity(int[] xs)
{
Assert.AreEqual(xs, xs.Reverse().Reverse());
}
}
Features
- FsCheckPropertyAttribute for easy integration with NUnit test discovery
- Automatic test case generation using FsCheck
- Full configuration support via attribute parameters
- Shrinking for minimal counter-examples
Configuration
Configure FsCheck via the FsCheckPropertyAttribute:
[<FsCheckProperty(MaxTest = 10000, StartSize = 100, EndSize = 1000)>]
member _.``Custom configuration`` (xs:list<int>) = true
Documentation
For comprehensive documentation, visit https://fscheck.github.io/FsCheck/
License
FsCheck.NUnit is licensed under the BSD 3-Clause license.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
NuGet packages (4)
Showing the top 4 NuGet packages that depend on FsCheck.NUnit:
| Package | Downloads |
|---|---|
|
Math.Units
Package Description |
|
|
Active.Net.AddOnlyDb
Simple syncable key-value database, based on SQLite |
|
|
KATReaderService.Core
KAT (Konnect Application Technology) is a unified low-code enterprise application platform by MMM Solutions — form builder, entity designer, workflow engine, LOB integrations, dashboards, scheduled processes, document OCR, PDF processing, e-signature, redaction and annotation, AI slot booking, scheduling and meetings, and enterprise authentication (OAuth 2.0/OIDC, Entra ID, Entra External ID, B2C, OKTA, Government eKYC). One Platform. Every Process. Zero Friction. |
|
|
Lykke.RabbitMqBroker.TestDataGenerators
Package Description |
GitHub repositories (2)
Showing the top 2 popular GitHub repositories that depend on FsCheck.NUnit:
| Repository | Stars |
|---|---|
|
elucidsoft/dotnet-stellar-sdk
Stellar API SDK for .NET 6.x
|
|
|
Enzx/NxGraph
NxGraph is a zero-allocation runtime, high-performance finite state machine (FSM) framework for .NET 8+, designed for scenarios where execution speed, memory efficiency, and runtime safety are critical.
|
| Version | Downloads | Last Updated |
|---|---|---|
| 3.4.0 | 214 | 8/20/2026 |
| 3.3.4 | 14,278 | 7/25/2026 |
| 3.3.3 | 72,168 | 4/26/2026 |
| 3.3.2 | 132,509 | 11/9/2025 |
| 3.3.1 | 34,401 | 8/24/2025 |
| 3.3.0 | 49,532 | 6/3/2025 |
| 3.2.0 | 29,709 | 4/10/2025 |
| 3.1.0 | 50,142 | 1/30/2025 |
| 3.0.1 | 17,904 | 1/22/2025 |
| 3.0.0 | 13,898 | 1/7/2025 |
| 3.0.0-rc3 | 40,788 | 3/3/2024 |
| 3.0.0-rc2 | 375 | 2/25/2024 |
| 3.0.0-rc1 | 10,907 | 7/23/2023 |
| 3.0.0-beta2 | 12,709 | 1/8/2022 |
| 3.0.0-beta1 | 1,515 | 9/5/2021 |
| 2.16.6 | 327,104 | 7/1/2023 |
| 2.16.5 | 163,826 | 6/1/2022 |
| 2.16.4 | 208,274 | 1/8/2022 |
| 2.16.3 | 34,779 | 9/4/2021 |
| 2.16.2 | 1,861 | 8/30/2021 |
Updated xunit.v3 to version 4.x. (by Simon Baynes)