NuGet ยท nuget

fscheck

Cached from upstream

Install

Install-Kommandos

dotnet add package fscheck --version 3.4.0
<PackageReference Include="fscheck" Version="3.4.0" />
paket add fscheck --version 3.4.0
Install-Package fscheck -Version 3.4.0

README

Vorschau

FsCheck

FsCheck is a tool for testing .NET programs automatically. The programmer provides a specification of the program in the form of properties which functions, methods or objects should satisfy, and FsCheck then tests that the properties hold in a large number of randomly generated cases.

Quick Start

Install via NuGet:

dotnet add package FsCheck

Define a property as a function that returns bool:

open FsCheck

let revRevIsOrig (xs:list<int>) = List.rev(List.rev xs) = xs

Check.Quick revRevIsOrig

When a property fails, FsCheck automatically displays a minimal counter-example and shrinks it to find the simplest failure case.

Features

  • Automatic test case generation using property-based testing
  • Shrinking to find minimal counter-examples when tests fail
  • Composable generators to guide test data generation
  • Integration with NUnit, xUnit.NET, MSTest and other frameworks
  • Works with F#, C# and VB.NET

Documentation

For comprehensive documentation, visit https://fscheck.github.io/FsCheck/

License

FsCheck is licensed under the BSD 3-Clause license.