FsCheck


FsCheck

FsCheck, NUnit and xUnit.NET plugin can be installed from NuGet:
PM> Install-Package FsCheck
PM> Install-Package FsCheck.NUnit
PM> Install-Package FsCheck.Xunit

Users have also created integrations with Fuchu and AutoFixture that you can find on NuGet.

Documentation

The documentation is also available in Japanese.

  • QuickStart to get started.

  • Properties descibes FsCheck's language to express tests - in other frameworks these are often called parametrized tests or generative tests. FsCheck calls them properties.

  • Generating test data describes how to guide FsCheck to generate better data or to stop it from generating data that doesn't make sense for what you're trying to test. FsCheck has a flexible language to describe test value generators and shrinkers, and apply them to your properties.

  • Model based testing is a particular testing approach where FsCheck generates a large number of random operations on an object or data structure, and the results of each operation are compared with a (much simpler) model.

  • Running Tests explains various ways to run FsCheck tests and how to integrate with unit testing frameworks.

  • Tips and tricks

  • API Reference contains automatically generated documentation for all types, modules and functions.

  • Model based testing vNext (Experimental) is a relatively new addition for a more powerful model based testing. It's still a bit rough around the edges, some things may not work, and it is subject to change (i.e. no promises regarding semantic versioning and breaking changes). Regardless, feedback is very much appreciated!

Contributing and copyright

The project is hosted on GitHub where you can report issues, fork the project and submit pull requests. If you're adding new public API, please also consider adding samples that can be turned into documentation.

The library is available under the BSD license, which allows modification and redistribution for both commercial and non-commercial purposes. For more information see the License file in the GitHub repository.

Fork me on GitHub