Skip to main content

Collection of awesome 😎️ Python resources for testing

317
GitHub Stars
226
Curated Resources
25
Categories
7 hours ago
Last Refreshed
AssertionsBehavior-driven DevelopmentCode CoverageDesign by ContractFake DataFixturesLLM & MCP TestingLoad TestingMemory ManagementMock and StubMutation TestingObject FactoriesPenetration TestingProperty Based TestingReportingRest API TestingRetrying TestsSnapshot TestsSpeedStatic ChecksTest RunnersTesting FrameworksToolsUI TestingResources

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

UI Testing

  • 9lives

    Self-healing CLI for UI tests: runs a failing pytest + Selenium spec, repairs the drifted locator offline, re-runs it, and shows a diff before applying. Refuses to rewrite assertions, so real regressions stay visible.

  • Agent QA

    A Node-based, open-source, self-improving QA agent that can exercise Python web applications externally through natural-language browser tests, persistent testing context, and self-healing tests.

  • aria-testing

    Accessibility-focused DOM testing library for tdom, built with modern Python 3.14+.

  • assay

    Deterministic QA tool that drives every control on a web page in Chromium through Playwright and reports where the page contradicts itself, with no tests to write and no LLM.

  • 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.

Mutation Testing

  • AdversaryGate

    Merge gate for AI-written patches: runs the tests on the baseline and on the patch, mutates only the lines the patch wrote, and answers MERGE, BLOCK or INCONCLUSIVE. Missing coverage or too few killed mutants is INCONCLUSIVE, never a pass. On PyPI as

  • bough

    Bough is a polyglot incremental mutation tester.

  • Cosmic Ray

    makes small changes to your source code, running your test suite for each one.

  • Crucible

    Adversarial test-hardening for AI-written code, built on mutmut. A Tester agent writes tests, mutation testing names the survivors, and a Critic agent kills exactly those.

  • greencheck

    Mutation testing aimed at the checker instead of the code: it mutates a known-good input and reports which mutations a validator, linter or CI quality gate fails to reject. Zero dependencies; on PyPI as

  • Mutatest

    Python mutation testing.

LLM & MCP Testing

  • agent-convergence-scorer

    A CLI and Python library that scores how lexically similar N agent or LLM outputs are: exact-match rate, Jaccard token overlap, divergence point, and a composite convergence score over any list of runs. An eval primitive for measuring reproducibility and fan-out collapse. Zero deps.

  • mcp-server-fuzzer

    A comprehensive fuzzing tool designed specifically for testing Model Context Protocol (MCP) servers. It supports both tool argument fuzzing and protocol type fuzzing across multiple transport protocols.

  • OrcaReplay

    Records a Python agent's calls to its model provider from outside the process, then serves the recording back so the same run happens again with the provider unreachable and no key. Turns a failed session into a regression test. Apache-2.0.

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.

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.

  • mdoctest

    Doctest for Markdown in any language: runs the console sessions and code blocks in your README/docs, verifies their output still matches, and rewrites them in place with

  • nose2

    The successor to

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,

Showing a sample of 226 resources. View the full list on GitHub →