FsCheck.NUnit
3.6.0
dotnet add package FsCheck.NUnit --version 3.6.0
NuGet\Install-Package FsCheck.NUnit -Version 3.6.0
<PackageReference Include="FsCheck.NUnit" Version="3.6.0" />
<PackageVersion Include="FsCheck.NUnit" Version="3.6.0" />
<PackageReference Include="FsCheck.NUnit" />
paket add FsCheck.NUnit --version 3.6.0
#r "nuget: FsCheck.NUnit, 3.6.0"
#:package FsCheck.NUnit@3.6.0
#addin nuget:?package=FsCheck.NUnit&version=3.6.0
#tool nuget:?package=FsCheck.NUnit&version=3.6.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.6.0 | 43,734 | 2026/10/21 |
| 3.5.0 | 5,847 | 2026/10/17 |
| 3.4.0 | 89,787 | 2026/8/20 |
| 3.3.4 | 22,666 | 2026/7/25 |
| 3.3.3 | 99,230 | 2026/4/26 |
| 3.3.2 | 167,794 | 2025/11/9 |
| 3.3.1 | 35,794 | 2025/8/24 |
| 3.3.0 | 60,507 | 2025/6/3 |
| 3.2.0 | 34,787 | 2025/4/10 |
| 3.1.0 | 84,357 | 2025/1/30 |
| 3.0.1 | 25,783 | 2025/1/22 |
| 3.0.0 | 19,874 | 2025/1/7 |
| 3.0.0-rc3 | 42,025 | 2024/3/3 |
| 3.0.0-rc2 | 409 | 2024/2/25 |
| 3.0.0-rc1 | 11,682 | 2023/7/23 |
| 3.0.0-beta2 | 12,745 | 2022/1/8 |
| 3.0.0-beta1 | 1,546 | 2021/9/5 |
| 2.16.6 | 406,777 | 2023/7/1 |
| 2.16.5 | 178,402 | 2022/6/1 |
| 2.16.4 | 217,345 | 2022/1/8 |
Additionally target netstandard2.1 and net8.0.
Added generators and shrinkers for `System.Index` and `System.Range` (#621), `Memory<T>`, `ReadOnlyMemory<T>`, `ReadOnlySequence<T>`, `ValueTask` and `ValueTask<T>` in netstandard2.1.
Added generators and shrinkers for `System.Half`, `Int128`, `UInt128`, `DateOnly`, `TimeOnly` and `Rune` in net8.0.
Added `NullableRef<T>` to conveniently generate nulls for reference types (#610).