About pytest-testmon
pytest-testmon is a pytest plugin that automatically selects and re-executes only the tests affected by recent code changes. It builds a database of which code each test touches, stored in a .testmondata file, and uses it to decide what needs to run after you edit files. It is aimed at Python developers and teams who want faster feedback from large test suites, and it can act as a continuous test runner when combined with pytest-watch.
The quickstart is short: install it with pip, run pytest with the testmon option once to build the dependency database, change some code, and run it again so that only affected tests execute. The README links to an article explaining how affected tests can be determined in a dynamic language like Python and how reliable that is, and the project site documents additional options.
The maintainers also invite open-source projects to try testmon in CI with no risk, offering to prepare a pull request that initially deselects no tests so projects can adopt the full behavior once they trust it. The plugin is written in Python and licensed under MIT.
Key features
- Selects tests affected by changed code
- Runs the most relevant tests first
- Dependency database stored locally
- Works as a continuous runner with pytest-watch
- Simple pytest command-line option
- CI trial program for open-source projects
Good fit for
- →Speeding up local test runs on large Python projects
- →Cutting CI time by skipping unaffected tests
- Built with
- Python
- Tags
- pytest
- testing
- python
- ci
- test-selection
- developer-tools
- plugin
- automation
pytest-testmon: questions and answers
- What is pytest-testmon used for?
- pytest-testmon is a pytest plugin that tracks code dependencies and re-runs only the tests affected by your recent changes, running the most relevant ones first. It is a good fit for speeding up local test runs on large Python projects and cutting CI time by skipping unaffected tests.
- Is pytest-testmon open source?
- Yes. pytest-testmon is open source under the MIT licence. Its source code is on GitHub at tarpas/pytest-testmon and is written mainly in Python.
- Is pytest-testmon free?
- Yes. pytest-testmon is open source, so the software itself is free to use.
- What are some alternatives to pytest-testmon?
- Similar open-source tools in the Testing & QA category include Tox, QA Wolf CLI and Lamda. SaaS products in the same category include Codecov, Coveralls and desplega.ai.
- Is pytest-testmon actively maintained?
- The most recent commit to pytest-testmon was on 1 December 2025, and the latest release is v2.2.0, published on 1 December 2025. The project has 1k stars on GitHub.
Open-source alternatives to pytest-testmon
See all
Tox
Testing & QA
Command line driven CI frontend and development task automation tool.
MIT★ 3.9k
QA Wolf CLI
Testing & QA
QA Wolf from anywhere — your terminal, your CI, your AI agent.
Apache-2.0★ 3.5k
Lamda
Testing & QA
Android Full-Stack Device Control Platform: WebRTC/H.264 remote desktop, UI/OCR/image-matc
MIT★ 8.5k
Magnitude
Testing & QA
Open-source, vision-first browser agent
Apache-2.0vs Browserbase★ 4.1k
Pa11y CI
Testing & QA
Pa11y CI is a CI-centric accessibility test runner, built using Pa11y
LGPL-3.0★ 637
Xcov
Testing & QA
Nice code coverage reporting without hassle
MITvs Codecov★ 573
SaaS alternatives to pytest-testmon
See all
Codecov
Testing & QA
Code coverage reporting and test analytics that comments on pull requests
SaaS
Coveralls
Testing & QA
Hosted code coverage tracking that reports on commits and pull requests
SaaS
desplega.ai
Testing & QA
No-code AI platform that automates end-to-end QA test creation, running and maintenance
SaaS
Acceslab
Testing & QA
AI-powered WCAG scanner that checks website accessibility and produces compliance reports
SaaS
Cypress Cloud
Testing & QA
Dashboard and parallelization service for Cypress end-to-end test runs
SaaS
Jam
Testing & QA
Browser extension that captures bug reports with console logs and replays
SaaS

