# drmaciver/hypothesis

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/drmaciver-hypothesis).**

8,702 stars · 653 forks · Python · NOASSERTION

## Links

- GitHub: https://github.com/DRMacIver/hypothesis
- Homepage: https://hypothesis.works
- awesome-repositories: https://awesome-repositories.com/repository/drmaciver-hypothesis.md

## Description

Hypothesis is a property-based testing library for Python that automatically generates randomized input data to identify bugs and edge cases. It functions as an automated edge case finder and test data generator, creating diverse synthetic datasets based on defined strategies to stress test application logic.

The library includes a failing case shrinker that simplifies complex failing test inputs into the smallest possible examples to accelerate debugging. It also provides a mechanism for bug reproduction simplification by reducing the size of the input that triggers a failure.

The project covers broader capabilities in automated test input generation, edge case discovery, and state-machine model testing to find sequences of operations that lead to invalid states.

## Tags

### Testing & Quality Assurance

- [Test Case Generators](https://awesome-repositories.com/f/testing-quality-assurance/software-testing/test-execution-orchestration/test-case-generators.md) — Automatically generates diverse randomized input data and test scenarios to identify bugs and edge cases. ([source](https://github.com/drmaciver/hypothesis#readme))
- [Bug Reproduction Scripting](https://awesome-repositories.com/f/testing-quality-assurance/bug-reproduction-scripting.md) — Reduces complex failing test inputs to the smallest possible examples to make bug reproduction faster.
- [Constraint-Based Data Generation](https://awesome-repositories.com/f/testing-quality-assurance/constraint-based-data-generation.md) — Implements rule-based generation of diverse randomized inputs to thoroughly stress test application logic.
- [Failing Case Shrinkers](https://awesome-repositories.com/f/testing-quality-assurance/failing-case-shrinkers.md) — Provides a mechanism to simplify complex failing test inputs into the smallest possible examples.
- [Example Shrinking](https://awesome-repositories.com/f/testing-quality-assurance/general-testing-utilities/test-utilities-assertions/test-lifecycle-execution-control/transient-failure-reruns/failed-test-rerunning/example-shrinking.md) — Simplifies complex failing inputs into the smallest possible examples that still trigger the original failure. ([source](https://github.com/drmaciver/hypothesis#readme))
- [Generative Testing](https://awesome-repositories.com/f/testing-quality-assurance/software-testing/test-execution-orchestration/generative-testing.md) — Implements property-based testing by generating numerous random test cases to validate code invariants.
- [Python Libraries](https://awesome-repositories.com/f/testing-quality-assurance/software-testing/test-execution-orchestration/test-case-generators/property-based-fuzzing/python-libraries.md) — Provides a comprehensive property-based testing framework specifically designed for the Python ecosystem.
- [Automated Test Generators](https://awesome-repositories.com/f/testing-quality-assurance/software-testing/testing-frameworks/test-frameworks/execution-and-infrastructure/automated-test-generators.md) — Automatically generates randomized datasets to stress test code logic and improve software robustness.
- [Test Case Shrinking](https://awesome-repositories.com/f/testing-quality-assurance/test-case-shrinking.md) — Includes a shrinking algorithm that reduces complex failing examples to their minimal form to accelerate debugging.
- [Input Space Partitioning](https://awesome-repositories.com/f/testing-quality-assurance/input-space-partitioning.md) — Systematically divides the range of possible input values into subsets to discover boundary conditions.

### Programming Languages & Runtimes

- [Test Data Generators](https://awesome-repositories.com/f/programming-languages-runtimes/language-features-paradigms/language-features/core-conceptual-frameworks/programming-language-concepts/random-number-generation/random-number-generators/random-data-generators/test-data-generators.md) — Creates diverse sets of synthetic data based on defined strategies to stress test application logic.
- [Deterministic](https://awesome-repositories.com/f/programming-languages-runtimes/language-features-paradigms/language-features/core-conceptual-frameworks/programming-language-concepts/random-number-generation/reproducible-randomizers/seeding-utilities/deterministic.md) — Provides deterministic seeding to ensure failing random input sequences can be exactly reproduced for debugging.

### Software Engineering & Architecture

- [Edge Case Analysis](https://awesome-repositories.com/f/software-engineering-architecture/edge-case-analysis.md) — Automatically identifies unexpected inputs and boundary conditions that cause software to crash or behave incorrectly.
- [State Transition Testing](https://awesome-repositories.com/f/software-engineering-architecture/action-based-state-transitions/state-transition-testing.md) — Simulates random sequences of actions to verify that state transitions in a system remain valid.

### Part of an Awesome List

- [Testing Frameworks](https://awesome-repositories.com/f/awesome-lists/devtools/testing-frameworks.md) — Property-based testing library.
