Top pytest Plugins

This is intended to find the most popular (as determined by download count) pytest plugins, as plugins usually have “pytest” in the name.
Counts are the number of downloads over 30 days.

The list

Data last updated: 2025-10-01 06:34:06

# Package Downloads Summary
1 pytest-cov 87,734,659 pytest plugin for measuring coverage.
Test and Code episode pytest-cov : The pytest plugin for measuring coverage
2 pytest-xdist 60,339,993 pytest xdist plugin for distributed testing, most importantly across multiple CPUs
3 pytest-asyncio 58,863,028 pytest support for asyncio
4 pytest-mock 50,729,095 Thin-wrapper around the mock package for easier use with pytest
Test and Code episode pytest-mock : Mocking in pytest
5 pytest-metadata 20,673,082 pytest plugin for test session metadata
Test and Code episode pytest-metadata - provides access to test session metadata
6 pytest-timeout 19,970,678 pytest plugin to abort hanging tests
7 pytest-rerunfailures 19,642,826 pytest plugin to re-run tests to eliminate flaky failures
8 hypothesis 19,272,028 A library for property-based testing
Includes a small pytest plugin.
9 pytest-html 13,103,736 pytest plugin for generating HTML reports
Test and Code episode pytest-html - a plugin that generates HTML reports for test results
10 pytest-env 11,334,324 pytest plugin that allows you to add environment variables.
11 pytest-django 10,125,839 A Django plugin for pytest.
Test and Code episode pytest-django with Adam Johnson
12 pytest-split 9,298,538 pytest plugin which splits the test suite to equally sized sub suites based on test execution time.
13 pytest-json-report 7,920,636 A pytest plugin to report test results as JSON files
Seems no longer supported, but leaving here to recommend pytest-json-report-wip
14 pytest-random-order 7,858,333 Randomise the order in which pytest tests are run with some control over the randomness
15 pytest-unordered 5,858,707 Test equality of unordered collections in pytest
16 pytest-localserver 5,823,033 pytest plugin to test server connections locally.
17 pytest-custom-exit-code 5,581,286 Exit pytest test session with custom exit code in different scenarios
18 pytest-repeat 5,374,475 pytest plugin for repeating tests
Test and Code episode pytest-repeat - works fine on Python 3.14
19 pytest-instafail 5,052,010 pytest plugin to show failures instantly
20 pytest-icdiff 4,927,096 use icdiff for better error messages in pytest assertions
21 pytest-base-url 4,871,058 pytest plugin for URL based testing
22 pytest-benchmark 4,768,497 A pytest fixture for benchmarking code. It will group the tests into rounds that are calibrated to the chosen timer.
23 pytest-playwright 4,387,958 A pytest wrapper with fixtures for Playwright to automate web browsers
24 allure-pytest 4,234,434 Allure pytest integration
25 pytest-sugar 4,161,715 pytest-sugar is a plugin for pytest that changes the default look and feel of pytest (e.g. progressbar, show tests that fail instantly).
26 pytest-socket 4,077,762 pytest Plugin to disable socket calls during tests
27 pytest-randomly 3,649,795 pytest plugin to randomly order tests and control random.seed.
28 syrupy 3,637,519 pytest Snapshot Test Utility
29 pytest-order 3,430,584 pytest plugin to run your tests in a specific order
30 pytest-subtests 3,380,856 unittest subTest() support and subtests fixture
Test and Code episode Subtests in Python with unittest and pytest
31 pytest-ordering 3,275,017 pytest plugin to run your tests in a specific order
32 pytest-dotenv 2,660,558 A py.test plugin that parses environment files before running tests
33 pytest-httpx 2,585,085 Send responses to httpx.
34 pytest-check 2,395,790 A pytest plugin that allows multiple failures per test.
Test and Code episode pytest-check - allow multiple failures per test
35 pytest-httpserver 2,372,608 pytest-httpserver is a httpserver for pytest
36 pytest-postgresql 2,106,584 Postgresql fixtures and fixture factories for pytest.
37 pytest-timeouts 1,854,620 Linux-only pytest plugin to control durations of various test case execution phases
38 pytest-recording 1,807,603 A pytest plugin powered by VCR.py to record and replay HTTP traffic
39 pytest-retry 1,805,205 Adds the ability to retry flaky tests in CI environments
40 pytest-snapshot 1,517,261 A plugin for snapshot testing with pytest.
41 pytest-aiohttp 1,463,288 pytest plugin for aiohttp support
42 pytest-freezegun 1,447,453 Wrap tests with fixtures in freeze_time
43 pytest-dependency 1,410,807 Manage dependencies of tests
44 pytest-bdd 1,374,457 BDD for pytest
45 pytest-assume 1,337,323 A pytest plugin that allows multiple failures per test
46 pytest-factoryboy 1,300,486 Factory Boy support for pytest.
47 pytest-github-actions-annotate-failures 1,288,272 pytest plugin to annotate failed tests with a workflow command for GitHub Actions
48 pytest-lazy-fixture 1,251,901 It helps to use fixtures in pytest.mark.parametrize
49 pytest-flask 1,153,718 A set of py.test fixtures to test Flask applications.
50 pytest-memray 1,152,935 A simple plugin to use with pytest
51 pytest-profiling 1,128,851 Profiling plugin for py.test
52 pytest-homeassistant-custom-component 1,116,465 Experimental package to automatically extract test plugins for Home Assistant custom components
53 pytest-vcr 1,037,947 Plugin for managing VCR.py cassettes
54 pytest-split-tests 997,957 A pytest plugin for running a subset of your tests by splitting them in to equally sized groups. Forked from Mark Adams’ original project pytest-test-groups.
55 pytest-celery 972,952 pytest plugin for Celery
56 pytest-test-groups 944,168 A pytest plugin for running a subset of your tests by splitting them in to equally sized groups.
57 pytest-watcher 898,433 Automatically rerun your tests on file modifications
58 pytest-durations 883,200 pytest plugin reporting fixtures and test functions execution time.
59 pytest-testmon 877,847 selects tests affected by changed files and methods
60 pytest-codspeed 826,248 pytest plugin to create CodSpeed benchmarks
61 pytest-azurepipelines 816,256 Formatting PyTest output for Azure Pipelines UI
62 pytest-flakefinder 771,265 Runs tests multiple times to expose flakiness.
63 pytest-cases 759,354 Separate test code from test cases in pytest.
64 pytest-docker-tools 752,621 Docker integration tests for pytest
65 pytest-testinfra 722,320 Test infrastructures
66 pytest-docker 717,645 Simple pytest fixtures for Docker and Docker Compose based tests
67 pytest-datadir 711,878 pytest plugin for test data directories and files
68 pytest-watch 685,780 Local continuous test runner with pytest and watchdog.
69 pytest-opentelemetry 682,553 A pytest plugin for instrumenting test runs via OpenTelemetry
70 pytest-archon 667,816 Rule your architecture like a real developer
71 pytest-find-dependencies 662,169 A pytest plugin to find dependencies between tests
72 pytest-pylint 662,126 pytest plugin to check source code with pylint
73 pytest-ansible 648,369 Plugin for pytest to simplify calling ansible modules from tests or fixtures
74 pytest-plus 634,413 PyTest Plus Plugin :: extends pytest functionality
75 pytest-freezer 598,632 pytest plugin providing a fixture interface for spulec/freezegun
76 pytest-nunit 586,022 A pytest plugin for generating NUnit3 test result XML output
77 pytest-reportlog 575,790 Replacement for the –resultlog option, focused in simplicity and extensibility
78 pytest-mypy 537,929 A pytest Plugin for Mypy
79 pytest-reportportal 524,787 Agent for Reporting results of tests to the Report Portal
80 pytest-sftpserver 508,416 py.test plugin to locally test sftp server connections.
81 pytest-eventlet 469,442 Applies eventlet monkey-patch as a pytest plugin.
82 pytest-parametrized 460,484 pytest decorator for parametrizing tests with default iterables.
83 pytest-lazy-fixtures 455,388 Allows you to use fixtures in @pytest.mark.parametrize.
84 pytest-alembic 452,919 A pytest plugin for verifying alembic migrations.
85 pytest-qt 452,413 pytest support for PyQt and PySide applications
86 pytest-doctestplus 451,872 pytest plugin with advanced doctest features.
87 pytest-pretty 434,535 pytest plugin for printing summary data as I want it
88 pytest-flake8 426,511 pytest plugin to check FLAKE8 requirements
89 pytest-deadfixtures 420,551 A simple plugin to list unused fixtures in pytest
90 pytest-clarity 397,880 A plugin providing an alternative, colourful diff output for failing assertions.
91 pytest-embedded-serial-esp 397,727 Make pytest-embedded plugin work with Espressif target boards.
92 pytest-mock-resources 388,803 A pytest plugin for easily instantiating reproducible mock resources.
93 pytest-embedded-serial 379,258 Make pytest-embedded plugin work with Serial.
94 pytest-explicit 378,568 A pytest plugin to ignore certain marked tests by default
95 pytest-variables 357,326 pytest plugin for providing variables to tests/fixtures
96 pytest-trio 352,198 pytest plugin for trio
97 pytest-spark 343,055 pytest plugin to run the tests with support of pyspark.
98 pytest-race 341,822 Race conditions tester for pytest
99 pytest-regressions 311,879 Easy to use fixtures to write regression tests.
100 pytest-selenium 310,739 pytest plugin for Selenium
101 pytest-mpl 304,299 pytest plugin to help with testing figures output from Matplotlib
102 pytest-black 294,092 A pytest plugin to enable format checking with black
103 pytest-md-report 288,346 A pytest plugin to generate test outcomes reports with markdown table format.
Test and Code episode pytest-md and pytest-md-report: Markdown reports for pytest
104 pytest-structlog 287,429 Structured logging assertions
105 pytest-tornasync 270,729 py.test plugin for testing Python 3.5+ Tornado code
106 pytest-remotedata 268,039 pytest plugin for controlling remote data access.
107 pytest-examples 253,631 pytest plugin for testing examples in docstrings and markdown files.
108 pytest-helpers-namespace 252,577 pytest Helpers Namespace Plugin
109 pylint-pytest 246,455 A Pylint plugin to suppress pytest-related false positives.
110 pytest-describe 243,273 Describe-style plugin for pytest
111 pytest-subprocess 243,007 A plugin to fake subprocess for pytest
112 pytest-tornado 238,833 A py.test plugin providing fixtures and markers to simplify testing of asynchronous tornado applications.
113 pytest-cpp 232,618 Use pytest’s runner to discover and execute C++ tests
114 pytest-picked 230,214 Run the tests related to the changed files
115 pytest-filter-subpackage 229,577 pytest plugin for filtering based on sub-packages
116 pytest-cache 227,570 pytest plugin with mechanisms for caching across test runs
117 pytest-harvest 212,335 Store data created during your pytest tests execution, and retrieve it at the end of the session, e.g. for applicative benchmarking purposes.
118 pytest-logger 202,947 Plugin configuring handlers for loggers from Python logging module.
119 flake8-pytest-style 202,841 A flake8 plugin checking common style issues or inconsistencies with pytest-based tests.
120 pytest-redis 201,335 Redis fixtures and fixture factories for pytest.
121 pytest-insta 199,916 A practical snapshot testing plugin for pytest
122 pytest-timestamper 198,844 pytest plugin to add a timestamp prefix to the pytest output
123 pytest-integration 195,055 Organizing pytests by integration or not
124 pytest-rng 188,221 Fixtures for seeding tests and making randomness reproducible
125 pytest-csv 185,839 CSV output for pytest.
126 pytest-echo 177,812 pytest plugin that allows to dump environment variables, package version and generic attributes
127 pytest-shutil 176,559 A goodie-bag of unix shell and environment tools for py.test
128 pytest-fixture-config 174,651 Fixture configuration utils for py.test
129 pytest-xvfb 174,191 A pytest plugin to run Xvfb (or Xephyr/Xvnc) for tests.
130 pytest-mysql 171,876 MySQL process and client fixtures for pytest
131 pytest-markdown-docs 170,837 Run markdown code fences through pytest
132 pytest-reporter 166,650 Generate pytest reports with templates
133 pytest-tap 166,528 Test Anything Protocol (TAP) reporting plugin for pytest
134 pytest-arraydiff 161,373 pytest plugin to help with comparing array output from tests
135 pytest-astropy-header 161,268 pytest plugin to add diagnostic information to the header of the test output
136 pytest-slack 161,120 pytest to Slack reporting plugin
137 pytest-astropy 158,753 Meta-package containing dependencies for testing
138 pytest-reporter-html1 157,966 A basic HTML report template for pytest
139 pytest-testrail 156,828 pytest plugin for creating TestRail runs and adding results
140 pytest-regex 156,525 Select pytest tests with regular expressions
141 pytest-json 153,073 Generate JSON test reports
142 pytest-parametrization 151,518 Simpler PyTest parametrization
143 pytest-operator 151,288 Fixtures for Charmed Operators
144 pytest-console-scripts 150,111 pytest plugin for testing console scripts
145 pytest-bazel 149,016 A pytest runner with bazel support
146 pytest-json-ctrf 147,684 pytest plugin to generate json report in CTRF (Common Test Report Format)
147 pytest-md 146,929 Plugin for generating Markdown reports for pytest results
Test and Code episode pytest-md and pytest-md-report: Markdown reports for pytest
148 pytest-mypy-plugins 145,588 pytest plugin for writing tests for mypy plugins
149 pytest-jira-xray 145,586 pytest plugin to integrate tests with JIRA XRAY
150 pytest-twisted 143,057 A twisted plugin for pytest.
151 pytest-skip-slow 141,325 A pytest plugin to skip @pytest.mark.slow tests by default.
152 pytest-embedded 140,225 A pytest plugin that designed for embedded testing.
153 pytest-xprocess 138,934 A pytest plugin for managing processes across test runs.
154 pytest-codeblocks 135,722 Test code blocks in your READMEs
155 pytest-html-merger 135,543 pytest HTML reports merging utility
156 pytest-embedded-idf 135,330 Make pytest-embedded plugin work with ESP-IDF.
157 pytest-depends 133,238 Tests that depend on other tests
158 qase-pytest 131,587 Qase pytest Plugin for Qase TestOps and Qase Report
159 pytest-grpc 129,027 pytest plugin for grpc
160 pytest-webdriver 129,005 Selenium webdriver fixture for py.test
161 pytest-embedded-qemu 124,949 Make pytest-embedded plugin work with QEMU.
162 pytest-pytestrail 122,892 pytest plugin for interaction with TestRail
163 pytest-responses 122,037 py.test integration for responses
164 pytest-runtime-xfail 120,991 Call runtime_xfail() to mark running test as xfail.
165 pytest-incremental 119,556 an incremental test runner (pytest plugin)
166 pytest-ruff 117,206 pytest plugin to check ruff requirements.
167 pytest-schema 115,351 👍 Validate return values against a schema-like object in testing
168 pytest-fail-slow 113,846 Fail tests that take too long to run
169 pytest-tagging 110,096 a pytest plugin to tag tests
170 pytest-emoji 109,762 A pytest plugin that adds emojis to your test result report
171 pytest-isort 105,946 py.test plugin to check import ordering using isort
172 pytest-pudb 104,563 pytest PuDB debugger integration
173 pytest-print 102,195 pytest-print adds the printer fixture you can use to print messages to the user (directly to the pytest runner, not stdout)
174 pytest-datafiles 101,182 py.test plugin to create a ’tmp_path’ containing predefined files/directories.
175 pytest-asyncio-cooperative 97,213 Run all your asynchronous tests cooperatively.
176 pytest-container 95,414 pytest fixtures for writing container based tests
177 pytest-databases 94,896 Reusable database fixtures for any and all databases.
178 pytest-loguru 92,095 pytest Loguru
179 pytest-excel 91,134 pytest plugin for generating excel reports
180 pytest-mpi 87,201 pytest plugin to collect information from tests
181 pytest-monitor 85,064 pytest plugin for analyzing resource usage.
182 pytest-func-cov 84,544 pytest plugin for measuring function coverage
183 allure-pytest-bdd 82,443 Allure pytest-bdd integration
184 pytest-embedded-jtag 82,296 Make pytest-embedded plugin work with JTAG.
185 pytest-pep8 81,690 pytest plugin to check PEP8 requirements
186 pytest-flakes 79,915 pytest plugin to check source code with pyflakes
187 pytest-spec 78,100 Library pytest-spec is a pytest plugin to display test execution output like a SPECIFICATION.
188 allure-pytest-default-results 77,522 Generate default “unknown” results to show in Allure Report if test case does not run
189 pytest-logging 76,488 Configures logging and allows tweaking the log level with a py.test flag
190 pytest-anyio 74,808 The pytest anyio plugin is built into anyio. You don’t need this package.
191 pytest-gnupg-fixtures 72,692 pytest fixtures for testing with gnupg.
192 pytest-xdist-worker-stats 70,148 A pytest plugin to list worker statistics after a xdist run.
193 pytest-pikachu 69,722 Show surprise when tests are passing
194 pytest-only 68,379 Use @pytest.mark.only to run a single test
195 pytest-git-fixtures 66,969 pytest fixtures for testing with git.
196 pytest-portion 63,966 Select a portion of the collected tests
197 pytest-sentry 62,625 A pytest plugin to send testrun information to Sentry.io
198 pytest-circleci-parallelized 62,139 Parallelize pytest across CircleCI workers.
199 pytest-codecov 61,773 pytest plugin for uploading pytest-cov results to codecov.io
200 pytest-raises 61,303 An implementation of pytest.raises as a pytest.mark fixture

Current process is based on hugovk’s Top PyPI Packages. Package data is filtered for “pytest”.
There’s also a filter for deprecated and unmaintained plugins.
See source code.