This repository contains the slide deck, accompanying source code, and errata for a presentation on property-based testing, using FsCheck with .NET Core
To date, this material has been presented:
- At eVision Industry Software (Friday 22 September 2017)
The code has been arranged as three independent projects, each inside its own folder:
quickpbt_fs/
... contains all of the example materials in F#quickpbt_vb/
... contains all of the example materials in Visual Basicquickpbt_cs/
... contains all of the example materials in C#
Note, however, each project is merely a transliteration of the others.
Additionally, all three projects have been designed for use in conjunction with the dotnet test
command-line interface.
For browsing the F# source, Visual Studio Code (with the Omnisharp and Ionide plugins) is recommended.
For browsing the Visual Basic source, Visual Studio 2017 (any edition, for Windows) is recommended.
For browsing the C# source, either Visual Studio Code (with the Omnisharp plugin) or Visual Studio 2017 (any edition, for Windows) is recommended.
At the time of last update, none of the projects are known to load successfully in Jet Brain's Rider or Visual Studio for Mac.
Additionally, the media/
folder contains the presentation as both a Microsoft PowerPoint slide deck and a PDF file.
- .NET Core SDK (version 2.0 or higher)
Navigate to the desired project folder:
~> cd quickpbt/quickbot_fs/
Restore any missing packages:
~/quickpbt/quickbot_fs> dotnet restore
Execute the full test suite:
~/quickpbt/quickbot_fs> dotnet test
After a rather long-ish bit of output, you should see something like the following:
Total tests: 19. Passed: 16. Failed: 3. Skipped: 0.
Test Run Failed.
Test execution time: 2.8377 Seconds
(Note that, if everything runs correctly, exactly three tests should have failed. This is for demonstration purposes.)
Execute only tests related to a single category ("Teaser", for example):
~/quickpbt/quickbot_fs> dotnet test --filter=teaser
Note that the tests around "Observations" and/or "Data Generation" require a change to the default verbosity for the dotnet
CLI:
~/quickpbt/quickbot_fs> dotnet test --filter=observations --verbosity normal