Proptest
proptest-rs.github.io
- Free plan
- Web
What Proptest is
Proptest is a free property-testing framework for Rust, inspired by Python's Hypothesis. It generates random values through strategies and simplifies failing inputs until it finds a minimal reproducible case. Failed cases can be stored in a proptest-regressions directory and replayed in later runs. Generation and shrinking are defined per value rather than per type, allowing strategies to be composed, and the framework includes a substantial strategy library. Proptest supports state-machine testing for systems such as database APIs and client-server interactions. Optional fork and timeout features run cases in subprocesses and restrict execution time. A passing test requires 256 successful cases by default. The current minimum supported Rust version is 1.88. Partial no_std support needs a nightly compiler with alloc or std and omits failure persistence, forking, and regex-dependent features. WebAssembly compilation is highly experimental; i128 and u128 numeric strategies are unavailable there. The repository contains Apache-2.0 and MIT licenses, and maintenance is mainly passive and volunteer-based.
Who it suits
Proptest suits Rust developers who need randomized, shrinking, reproducible, or stateful tests. It is also relevant to projects targeting no_std or WebAssembly that can accept the documented limitations.
Good to know, and what to watch
- Automatic minimal failing cases
- Persisted failures replay later
- State-machine testing support
- Subprocess fork and timeout options
- Apache-2.0 and MIT licensing
- Partial no_std support
- WebAssembly support is highly experimental
- Requires Rust 1.88 or newer
- Passive volunteer maintenance
The verdict
Proptest provides broad property-testing tools for Rust, including shrinking, persistence, and stateful testing. Its experimental WebAssembly support and no_std restrictions matter for specialized targets.
What the maker publishes
- Default test count
- The default number of successful test cases required for a test to pass is 256. source
- Failure minimization
- When a failure is found, Proptest automatically finds a minimal test case that reproduces it. source
- Failure persistence
- Failing cases are persisted under a proptest-regressions directory and replayed in later test runs. source
- Forking and timeouts
- Optional fork and timeout features run test cases in subprocesses and limit their execution time. source
- Generation model
- Generation and shrinking are defined per value rather than per type, which enables flexible composition. source
- Input generation
- Generation and shrinking are defined per value rather than per type. source
- Licensing
- The repository contains Apache-2.0 and MIT licenses. source
- Maintenance model
- Proptest is maintained on a volunteer basis. source
- Maintenance status
- The crate is feature-complete and mainly receives passive maintenance. source
- Minimal cases
- When a failure is found, Proptest automatically finds the minimal test case that reproduces it. source
- no_std limitations
- The no_std build does not provide failure persistence, forking, or features depending on crates such as regex. source
- No-std limits
- Failure persistence, forking, and regex support are unavailable in the no_std build. source
- no_std support
- Proptest has partial no_std support and requires a nightly compiler with alloc or std for memory allocation. source
- Purpose
- Proptest is a property testing framework for Rust inspired by Python’s Hypothesis framework. source
- Rust version
- The current minimum supported Rust version is 1.88. source
- State-machine testing
- Proptest supports state-machine testing for systems such as database APIs and client-server interactions. source
- Strategies
- A strategy generates random values and shrinks them into simpler forms, and Proptest ships with a substantial strategy library. source
- Strategies
- Tests can use regular expressions, integer ranges, and other Strategy expressions to generate inputs. source
- Support
- Bug reports and questions are welcome through the project repository, and contributors are asked to include Rust version, Proptest version, and relevant operating-system details. source
- WebAssembly
- Proptest can compile for WebAssembly targets, but this support is highly experimental and has had little substantial testing. source
- WebAssembly limits
- On WebAssembly targets, numeric strategies for i128 and u128 are unavailable. source
Checked against the maker's pages on 1 Oct 2026.