O'Reilly logo

Get Programming with F#: A guide for .NET developers by Isaac Abraham

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Lesson 41. Property-based testing in F#

This lesson presents a different type of automated testing that you can do in F#, called property-based testing (PBT). You’ll see

  • What PBT is
  • Why you might want to use it
  • How to use the FsCheck library for .NET
  • How to integrate FsCheck with popular test runners

At times, even if you’ve achieved “full test coverage”—where your tests are covering every branch of code in the system—you still might not be satisfied with your tests. Here are a few examples.

One common problem occurs when your code misses edge cases that you hadn’t considered. This is common when working with strings or other “unbounded” inputs. How many times have you written code that expects a string to be a certain minimum length, but ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required