Introduction to Property-based Testing with F#

Learn what Property-based Testing is, and how to write and run such tests with F#.
Course info
Rating
(79)
Level
Intermediate
Updated
Apr 17, 2015
Duration
1h 34m
Table of contents
Introduction to Property-based Testing and FsCheck
Getting Started with the Diamond Kata
The Diamond Kata: Adding Letters
Completing the Diamond Kata
Description
Course info
Rating
(79)
Level
Intermediate
Updated
Apr 17, 2015
Duration
1h 34m
Description

In this course, you'll learn about Property-based Testing via an extensive code example. Property-based Testing is an automated testing technique where you incrementally zero in on the correct behavior of a system by describing its properties or qualities in general terms and then use randomly generated test data to execute deterministic tests. Specifically, you'll get an introduction to the FsCheck Property-based Testing framework, and see lots of code examples using the Diamond Kata as a continued example throughout the course.

About the author
About the author

Mark Seemann is the author of Dependency Injection in .NET and the inventor of AutoFixture. He is a professional programmer and software architect living in Copenhagen, Denmark, and currently an independent advisor. He enjoys reading, drawing, playing the guitar, good wine, and gourmet food.

More from the author
Type-Driven Development with F#
Intermediate
3h 56m
17 Jul 2015
Test-Driven Development with F#
Intermediate
2h 17m
6 May 2015
Unit Testing with F#
Beginner
1h 32m
31 Mar 2015
More courses by Mark Seemann
Section Introduction Transcripts
Section Introduction Transcripts

Getting Started with the Diamond Kata
Hello my name is Mark Seemann and this is the introduction to Property-based Testing with F# course Module two, Getting Started with the Diamond Kata. In this module you'll learn about the diamond kata and see how to get started with it. First you'll see how difficult it is to implement the diamond kata iteratively using standard example driven development or test driven development as you normally see it practiced. Second you'll see which properties you can find for the diamond. Finally towards the end of the module you'll see a couple of demos that implement the first of the properties identified for the diamond.

The Diamond Kata: Adding Letters
Hello my name is Mark Seemann and this is the introduction to property-based testing with F# course, Module three, The Diamond Kata: Adding Letters. In this module we'll continue with the diamond kata, incrementally adding more properties. You'll see demos of three properties. First, we'll add the property that the diamond should have the correct letters. Second, we'll add the property that the diamond should be horizontally symmetric. Third, we'll add the property that the diamond should be quadratic.

Completing the Diamond Kata
Hello my name is Mark Seeman and this is the introduction to Property-based Testing with F# course, module four, Completing the Diamond Kata. In this module you'll see the completion of the diamond kata based on the final pair of properties. When it's done, the implementation code could be nicer, so following the red/green refactor cycle you'll also see how to refactor the implementation so that it becomes prettier.