← Graph

Property-Based Testing

concept 2 connections

Testing technique where developers declare invariants the code must satisfy (e.g. 'reversing a list preserves its length'; 'the sum of line items is never smaller than any one line item') and a tool generates large numbers of random inputs — possibly thousands per run — trying to find counter-examples that violate the property. Each counter-example is effectively a discovered bug. The process is stochastic but phenomenal for business logic testing. You can run it for minutes or hours (e.g. 'today I run my CI two hours') to deepen confidence. Schirp notes there is no good property-based testing library in Ruby — an open opportunity for the community — and that the technique was god-tier for him in Haskell, particularly in finance.

category
practice
about
Property-Based Testing concept
Open opportunity in Ruby; Schirp calls for a good library and popularization.
concept Property-Based Testing
related_to
Haskell tool
Schirp credits Haskell/finance as where property-based testing was a god-send.

Provenance