FP /


Testing Erlang/OTP with QuickCheck

(Based on the project description by John: Testing Erlang-OTP with QuickCheck.)

Erlang/OTP is a concurrent functional language developed and maintained by Ericsson, and since 1998 available as Open Source software. Erlang is used to develop telecom and internet products such as switches, email gateways, instant messaging services, semi-structured databases and game servers, both at Ericsson and at a rapidly growing number of other companies worldwide. Erlang is delivered together with extensive libraries targeted specifically at robust and fault-tolerant distributed systems (the Open Telecoms Platform).

QuickCheck is a specification-based testing tool which replaces test cases by properties of the software under test which should hold for all possible inputs. Properties are tested in randomly generated test cases, using test-data generators that the QuickCheck user provides. When a test fails, it is automatically reduced to a minimal failing case to speed diagnosis of the problem. Thus QuickCheck provides a rapid and fully automatic route from formal specification to concise bug report. QuickCheck was first developed by Koen Claessen and John Hughes for Haskell; this project will use a commercial version for Erlang developed by Quviq AB.

ProTest is a European FP7 project which aims to further develop QuickCheck and other tools and methods for property-based testing, using Erlang as a common technological base. The ProTest team at Chalmers and the IT University comprise 6 researchers at present, and is working on property- based testing methods for concurrent software (including randomizing schedules to provoke race conditions), and methods to derive properties automatically from test suites and from code. New funding from the Swedish Science Council will boost the size of the team further.

The Goal of this Masterís project is to develop an extensive property-based test suite for as large a part of the Erlang/OTP libraries as is practicable, using QuickCheck and the prototype tools developed by the ProTest team. The properties should be developed in as modular a way as possible: for example, several libraries provide alternative implementations of a very similar interface, enabling the same properties to be used to test more than one library. There is an opportunity to develop new abstractions for expressing properties of large-scale libraries, since property-based test code is still a rather new phenomenon. Many libraries implement purely functional data-structures of one sort or another: here the ProTest teamís automated property discovery may be deployed with success. Ultimately, the project aims to create property-based software that can test the Erlang/OTP libraries much more thoroughly than hitherto, and by finding and reporting bugs to the OTP developers, contribute to the quality of future Erlang/OTP releases.

Contact John Hughes (john.hughes AT quviq.com, rjmh AT chalmers.se).


  • Functional Programming
  • Testing, debugging and Verification or Software Enginnering using Formal Methods
  • Programming Languages or Programming Paradigms
  • Compiler Construction or Software Constraints