John Hughes

Professor, Founder and CEO at Chalmers University of Technology and Quviq AB


Something good is always possible: testing smart contracts with QuickCheck
Wednesday 15:00 - 15:45
Property-based testing
Smart contracts

Your rating:

Property-based testing is an increasingly popular approach to testing software, in which instead of writing individual test cases, a developer specifies general properties of their code. These properties are then used to generate test cases that check that they always hold, and to report minimal failing test cases in the event that they don't. Property-based testing is supported by QuickCheck in Haskell, and nowadays also by many other tools in other languages. Smart contracts are particularly critical programs, because they spend real money, and bugs may result in enormous losses. So there are strong reasons to test them thoroughly--but what properties should hold, what should we test? In this talk I'll explain some of these challenges, and I'll describe the testing framework we've built on top of QuickCheck to test smart contracts on the Cardano blockchain.


John Hughes has been a functional programming enthusiast for more than thirty years, at the Universities of Oxford, Glasgow, and since 1992 at Chalmers University in Gothenburg, Sweden. He served on the Haskell design committee, co-chairing the committee for Haskell 98, and is the author of more than 100 papers, including "Why Functional Programming Matters", one of the classics of the area. With Koen Claessen, he created QuickCheck, the most popular testing tool among Haskell programmers, and in 2006 he founded Quviq to commercialise the technology using Erlang. Today he divides his time between the University and Quviq.