O'Reilly logo

Programming Elm by Jeremy Fairbank

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

Fuzz Your Tests

Selecting test inputs and considering edge cases can consume a lot of testing time. You mainly care that a certain property of a function holds true regardless of the input. For example, after you call addYears, you expect the difference between the old and new dates’ years to equal the argument to addYears.

In this section, you will use fuzz testing to test properties of your date library. You will generate random test input with fuzzers and use the input inside test code. You will discover the pros and cons of fuzz testing and learn when you should use it. You will also create your own fuzzer to randomly generate dates.

Create Your First Fuzz Test

Historically, developers in languages such as C++ and Java use fuzz testing to ...

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