Image logo Bob conference 2018.

Tutorial: 16:35-18:05 (English)

Matthias Fischmann

Hedgehog - QuickCheck, but better

hedgehog is a Haskell library for writing property-based tests similar to the more established QuickCheck: instead of “when passed [3, 1, 2], this function returns [1, 2, 3]”, you write “when passed a list of numbers, this function returns a list with the same elements in order”. properties are tested on a range of random values and provide far wider test coverage.

In this tutorial, you will get acquainted with the concepts of property-based testing and the specific benefits of hedgehog, like better error reporting and sound shrinking for free. With a little luck we’ll get as far as state machine testing like in the BOB QuickCheck talk.

Some experience with software development and writing tests in Haskell would be great. Knowledge of QuickCheck is not required. Instructions on how to get ready are on github. (Material and exercises will be provided from the same repository in the beginning of the tutorial.)

Matthias Fischmann

Matthias Fischmann has implemented his thesis at the Max Planck Institute for Computer Science in Haskell in 1999 when it was 7 years young, and has been a user and proponent of functional programming ever since. More recently he has developed an interest in software testing methods. He was the lead developer of the aula project. Starting in March he will be joining the wire Haskell backend developer team.