Personal tools
You are here: Home Events Milner Lectures Additional seminar

Additional seminar

Additional seminar

10am Wednesday 22 June

Informatics Forum IF-4.31/4.33


Putting Property-Based Testing to Work
John Hughes
Chalmers University, Gothenburg
Quviq AB, Gothenburg

Property-based testing is an approach to test automation popular in
the functional programming community, in which automated test cases
are replaced by general properties that ought to hold in many cases,
rather than just one. QuickCheck supports property-based testing by
generating test cases from the properties, executing them, and
adjudging the outcome. When a test fails, then QuickCheck "shrinks" it
to a minimal failing example, which usually makes diagnosing the
underlying fault very easy. In this way, QuickCheck reduces the cost
of testing while at the same time improving its quality.

I will introduce property-based testing and demonstrate QuickCheck for
Erlang, showing how to use it to test both Erlang and C programs. The
latter uses Erlang to support model-based testing against finite state
machine models, which are nicely represented in Erlang, exploiting its
purely functional features. I'll go on to discuss the challenges of
putting property-based testing into practice in industry, showing
"bugs I have known" in a variety of settings, and drawing a few
general lessons!


John Hughes

John Hughes is a long-time researcher in the area of functional
programming, a contributor to the design of Haskell, and author of
"Why Functional Programming Matters", one of the most widely read
articles in the area. In 2000 he and Koen Claessen developed
QuickCheck, an influential specification-based testing tool which last
year received the ACM SIGPLAN Award for Most Influential Paper of ICFP
2000. In 2006 he founded Quviq AB, which develops and markets a
commercial version of QuickCheck for Erlang, and in 2007 received the
Erlang User of the Year award as a result. Today he divides his time
between Quviq and a Chair at Chalmers University of Technology in
Gothenburg, with a research focus on the interplay of functional
programming and software testing.

Document Actions