Smart Testing with a functional approach (foss-north Community Day event)

This is a past event

41 people went


A session on Testing & Functional programming


14:30 - Doors open
14:50 - Welcome to the event
15:00 - John Hughes: Building on developers' intuitions
16:00 - Oskar Wickström: Property-Based Testing The Ugly Parts
17:00 - Pause and mingle
17:30 - Alejandro Russo: DraGen, a new generator of random data to use with QuickCheck
18:30 - More mingling
19:00 - Thanks for today

1ˢᵗ talk by John Hughes, Co-Designer Of Haskell and QuickCheck

Bio: John Hughes has been a functional programming enthusiast for more than thirty years, at the Universities of Oxford, Glasgow, and since 1992 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

Abstract: Property-based testing is increasingly popular, yet the properties that developers write are not always effective at revealing faults. Developers often don't notice this, because it’s impractical to inspect all the generated tests. But they DO have intuitions for tests they would like to run. Many try to generalize these into properties, but this works poorly. In this talk, I’ll show another way to use those intuitions to build effective properties cheaply. I'll also show new features in Haskell QuickCheck that support this way of working


2ᶮᵈ talk by Oskar Wickström, content creator of Haskell at Work and designer of the Open Source screencast editor Komposition

Bio: After some years of musical education, Oskar Wickström began his journey into the world of software. He’s currently doing remote work in Haskell, and in his spare time, he creates screencasts at Among the technical topics that interest Oskar are functional programming, systems design, web technology, and programming languages

Abstract: Property-based testing has been praised and explored in both functional and object-oriented programming communities. Despite the papers and talks that tell inspiring stories of curious bugs being found by random tests, it can be hard to see how it applies to your day-to-day work. How do you go beyond testing small pure functions?

In this talk we'll look at some techniques that you can use to test the "ugly" parts of your system, with real-world examples from Komposition, a screencast video editor written in Haskell


3ʳᵈ talk by Alejandro Russo, Professor at Chalmers University of Technology

Bio: His research focus on protecting confidentiality of data when manipulated by untrusted software components, i.e., software written by someone else. For that, he has been applying a wide-range of rigorous programming languages techniques and authored software solutions to build secure systems for the programming languages Haskell, Python, and JavaScript

Abstract: In QuickCheck (or, more generally, random testing), it is challenging to control random data generators’ distributions—specially when it comes to user-defined algebraic data types (ADT). In this talk, we adapt results from an area of mathematics known as branching processes, and show how they help to analytically predict (at compile-time) the expected number of generated constructors, even in the presence of mutually recursive or composite ADTs. Using our probabilistic formulas, we design heuristics capable of automatically adjusting probabilities in order to synthesize generators which distributions are aligned with users’ demands. We provide a Haskell implementation of our mechanism in a tool called and perform case studies with real-world applications. When generating random values, our synthesized QuickCheck generators show improvements in code coverage when compared with those automatically derived by state-of-the-art tool.