awesome-python-testing
github.com/cleder/awesome-python-testing ↗Collection of awesome 😎️ Python resources for testing
Use this list with your AI agent
Add the Context Awesome MCP server to Claude, Cursor, or any MCP client, then ask:
"Show me articles resources from awesome-python-testing"
Installation instructions →What's inside
Resources
- 30 best practices for software development and testingArticles
These software engineering rules and testing best practices might help save you time and headaches.
- Anna-Lena Popkes: "Mocking in Python"Articles
Mocking might seem confusing in the beginning but once you understand the basics it can be very helpful.
- Architecture Patterns with PythonBooks
- async test patterns for PytestArticles
Learn some handy async examples and patterns for testing in Pytest.
- Awesome PyTestRelated
Focused on pytest.
- Awesome PythonRelated
A curated list of awesome Python frameworks, libraries, software and resources.
Mock and Stub
- Aioresponses
is a helper for mock/fake web requests in python aiohttp package.
- Cornell
record & replay mock server.
- D-MemFS
Zero-dependency in-memory virtual filesystem with hard quotas. Provides an explicit, isolated instance instead of patching global state.
- doublex
Powerful test doubles framework for Python.
- Flexmock
is a testing library for Python that makes it easy to create mocks, stubs and fakes.
- freezegun
Travel through time by mocking the datetime module.
Snapshot Tests
- ApprovalTests
work by comparing the test results to a golden master.
- inline-snapshot
a pytest plugin that boosts efficiency when writing tests by generating code with the expected values and simplifies snapshot tests with pytest.
- SnapshotTest
is a way to test your APIs without writing actual test cases.
- syrupy
is a zero-dependency pytest snapshot plugin. It enables developers to write tests which assert immutability of computed results.
UI Testing
- aria-testing
Accessibility-focused DOM testing library for tdom, built with modern Python 3.14+.
- Flybirds
is a front-end UI automation test framework based on BDD mode, providing a series of out-of-the-box tools and complete documentation.
- Golem
is a test framework and a complete tool for browser automation. Tests can be written with code in Python, codeless using the web IDE, or both.
- helium
is great for web automation. Helium makes it easier to use.
- HMNextAuto
Python-based UI automation framework for HarmonyOS NEXT. API compatible with uiautomator2, supports XPath, image recognition, performance monitoring and notification management.
- Lost Pixel
is an open source visual regression testing tool. Run visual regression tests on your Storybook and Ladle stories and on your application pages.
Testing Frameworks
- async-asgi-testclient
A framework-agnostic library for testing ASGI web applications.
- doctest
(Python standard library) The doctest module searches for pieces of text that look like interactive Python sessions, and then executes those sessions to verify that they work exactly as shown.
- hammett
Fast python test runner, compatible with a subset of pytest.
- maelstrom
Maelstrom is a fast Rust and Python test runner that runs every test in its own container. Tests are either run locally or distributed to a clustered job runner.
- nose2
The successor to
- perftester
A lightweight framework for performance testing of Python functions; allows for testing of performance in terms of execution time and memory usage.
Property Based Testing
- Atheris
is a coverage-guided Python fuzzing engine. It supports fuzzing of Python code, but also native extensions written for CPython.
- hypofuzz
Adaptive fuzzing of Hypothesis tests.
- Hypothesis
is an advanced Quickcheck style property based testing library.
- hypothesis-auto
An extensions for Hypothesis that provides fully automatic testing for type hinted functions.
- hypothesis-crosshair
Add the power of solver-based symbolic execution to your Hypothesis tests with CrossHair.
- icontract-hypothesis
Instead of writing manually the Hypothesis search strategies for a function,
Fake Data
- autofaker
designed to minimize the setup/arrange phase of your unit tests by removing the need to manually write code to create anonymous variables as part of a test cases setup/arrange phase.
- fake2db
Fake database generator.
- faker
A Python package that generates fake data.
- genuine-fake
Genuine Fake means an imitation of a (usually) valuable object that is so good that it is, to all intents and purposes, identical.
- mimesis
A Python library that helps you generate fake data.
- radar
Generate random datetime / time.
Static Checks
- awesome-flake8-extensions
A curated list of awesome flake8 extensions.
- awesome-python-typing
Collection of awesome Python types, stubs, plugins, and tools to work with them.
- Bandit
is a tool designed to find common security issues in Python code.
- complexipy
An extremely fast Python library to calculate the cognitive complexity of Python files, written in Rust.
- flake8
is a python tool that glues together pep8, pyflakes, mccabe, and third-party plugins to check the style and quality of python code.
- pyanalyze
A tool for programmatically detecting common mistakes in Python code, such as references to undefined variables and some categories of type mismatches.
Showing a sample of 198 resources. View the full list on GitHub →