# tarpas/pytest-testmon

Selects tests affected by changed files. Executes the right tests first. Continuous test runner when used with pytest-watch.

Repository: https://github.com/tarpas/pytest-testmon
Canonical: https://ross.abutalabs.com/products/pytest-testmon
Homepage: https://testmon.org
Language: Python
License: MIT
License Family: permissive
Topics: python, testing, test-automation, build-tool, ci
Last push: 2025-12-01T07:34:04+00:00

## Health v2 (maintenance only)
Score: 57/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 55, release rhythm 35, longevity 100
- inputs: {"age_days": 4230, "days_push": 275, "days_rel": 275, "gap_med": 171.5, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1009, forks 79 (observed 2026-08-28T04:03:12.756418+00:00)

## What it is
pytest-testmon is a pytest plugin that tracks dependencies between tests and executed code using coverage data, then selects and runs only the tests affected by recent code changes. It maintains its own dependency database (.testmondata) independent of version control and can act as a continuous test runner when paired with pytest-watch.

## Use cases
- run only tests affected by my code changes
- speed up pytest in CI by skipping unaffected tests
- prioritize likely-failing tests first without deselecting any
- set up a continuous test runner that reruns tests on file save
- avoid rerunning the whole test suite after small edits

## When to choose
- your pytest suite is slow and you iterate frequently on code
- you want test selection that works without relying on git diffs
- you want failed tests always re-executed and affected tests prioritized
- you want to reduce CI time with a low-risk opt-in plugin

## When to avoid
- your test suite is already fast enough to run in full
- you need guaranteed full coverage on every commit and cannot tolerate any missed regressions
- you run tests under a debugger or coverage tool, where collection is disabled
- you are not using pytest

## Facets
- artifact type: plugin
- maturity: active
- function: testing, developer-tools, ci-cd
- domain: testing, developer-tools
- platform: python, cli, cross-platform
- tags: pytest-plugin, test-selection, test-impact-analysis, coverage-based, continuous-testing, python

## Member repositories
- tarpas/pytest-testmon (main) score 57

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:12.756418+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:12:04.711074+00:00, confidence not recorded.
  - readme: https://github.com/tarpas/pytest-testmon (fetched 2026-08-28T04:03:12.756418+00:00, sha a33f654c9452)
  - homepage: https://testmon.org (fetched 2026-08-29T13:12:22.697352+00:00, sha c6a4ae9749ff)
  - site_page: https://www.testmon.org/blog/new-features-in-13x (fetched 2026-08-29T13:12:22.706267+00:00, sha 26d66b1c8e03)
- Data as of 2026-08-30T08:39:29.467469+00:00.
