QuickerCheck: Implementing and Evaluating a Parallel Run-Time for QuickCheck
Robert Krook, Nicholas Smallbone, Bo Joel Svensson, Koen Claessen
TL;DR
QuickerCheck develops a parallel run-time for QuickCheck to accelerate property-based testing by running tests and shrinking in parallel across cores. The approach preserves the QuickCheck API while introducing a multi-threaded testing loop, work-stealing, and a parallel shrinking loop with deterministic and greedy strategies. Evaluations across six benchmarks show substantial speedups on slower properties and mixed results for shrinking, highlighting when parallel shrinking helps and when its overhead dominates. The work demonstrates practical impact by reducing programmer waiting time and outlines directions for broader integration and alternative size strategies.
Abstract
This paper introduces a new parallel run-time for QuickCheck, a Haskell library and EDSL for specifying and randomly testing properties of programs. The new run-time can run multiple tests for a single property in parallel, using the available cores. Moreover, if a counterexample is found, the run-time can also shrink the test case in parallel, implementing a parallel search for a locally minimal counterexample. Our experimental results show a 3--9$\times$ speed-up for testing QuickCheck properties on a variety of heavy-weight benchmark problems. We also evaluate two different shrinking strategies; deterministic shrinking, which guarantees to produce the same minimal test case as standard sequential shrinking, and greedy shrinking, which does not have this guarantee but still produces a locally minimal test case, and is faster in practice.
