Hypothesis: A new approach to property-based testing
Authors:
- David MacIverDMDavid MacIver
- Zac Hatfield-DoddsZHZac Hatfield-Dodds
- Many ContributorsMCMany Contributors
Open Access
- 21 November 2019
- journal article
- Published by The Open Journal in Journal of Open Source Software
- Vol. 4 (43) , 1891
Abstract
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.Keywords
This publication has 7 references indexed in Scilit:
- The Astropy Project: Building an Open-science Project and Status of the v2.0 Core Package*The Astronomical Journal, 2018
- Targeted property-based testing2017
- Test-case reduction for C compiler bugs2012
- The NumPy Array: A Structure for Efficient Numerical ComputationComputing in Science & Engineering, 2011
- Testing telecoms software with quviq QuickCheck2006
- Simplifying and isolating failure-inducing inputIEEE Transactions on Software Engineering, 2002
- QuickCheck2000