Hypothesis: A new approach to property-based testing

David R. MacIver, Zac Hatfield-Dodds, many other contributors · The Journal of Open Source Software · 2019

Property-based testing is a style of testing popularised by the QuickCheck family of libraries, first in Haskell (Claessen & Hughes, 2000) and later in Erlang (Arts, Hughes, Johansson, & Wiger, 2006), which integrates generated test cases into existing software testing workflows: Instead of tests that provide examples of a single concrete behaviour, tests specify properties that hold for a wide range of inputs, which the testing library then attempts to generate test cases to refute.For a general introduction to property-based testing, see (MacIver, 2019).Hypothesis is a mature and widely used property-based testing library for Python.It has over 100,000 downloads per week 1 , thousands of open source projects use it 2 , and in 2018 more than 4% of Python users surveyed by the PSF reported using it 3 .It will be of interest both to researchers using Python for developing scientific software, and to software testing researchers as a platform for research in its own right.

Read the paper · More papers on PaperTik