Skip to main content

Analyze test redundancy using coverage data.

Project description

recov: Optimize Test Suites & Speed Up CI/CD

Motivation

Modern software projects often accumulate large test suites, but not all tests contribute unique value. Redundant tests slow down CI/CD pipelines, waste compute resources, and obscure true coverage gaps. recov helps you identify and remove tests that do not contribute unique coverage, so you can:

  • Speed up CI/CD by running only the essential tests
  • Reduce maintenance by focusing on meaningful tests

Features

  • Detects redundant tests using coverage data (lines and branches)
  • Fast, in-memory analysis with DuckDB and PyArrow
  • Rich terminal output for easy review
  • Works with pytest-cov and Coverage.py
  • CLI and Python API

Quickstart

  1. Run your tests with coverage contexts:
    pytest --cov=src --cov-context=test --cov-branch --cov-append
    
  2. Analyze for redundant tests:
    uvx recov  # or use the CLI entrypoint
    

Usage

  • By default, recov analyzes line coverage. Use --with-branches to require branch coverage.
  • Results show which tests are redundant (their coverage is fully covered by other tests).
  • Remove or refactor redundant tests to optimize your suite and speed up CI/CD.

Source File Filter

By default, rcov filters source files using a hard-coded substring (src/recov). Update this filter in src/recov/__init__.py line 177 to match your project's source path (e.g., src/yourproject).

Development & Contributing

Contributions welcome: open issues or PRs to improve detection, performance, or usability.

AI Use Disclaimer

This tool has been built with a lot of support of AI.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

recov-0.1.1.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

recov-0.1.1-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file recov-0.1.1.tar.gz.

File metadata

  • Download URL: recov-0.1.1.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for recov-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5322929a98aa81079867d3b7175ed5ab1bda128fb597aaad812a7a4bf195732b
MD5 b3b51ce46563a82941cafb98c28b94e2
BLAKE2b-256 15f8e4b647f8160ff0a78381c4f4a6930b72a43ed78d12d740fbfc3c14b33858

See more details on using hashes here.

File details

Details for the file recov-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: recov-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for recov-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 67e68aa9a41ae68bb35c90c8b7498b5fb78002eb1b4472bfc1009fac3ec3d0b9
MD5 4cb2f369eaa2a7bfc9f57031ba585fd9
BLAKE2b-256 ff0a94bd39a208660f1629ec3a1830840bbf445b773359840e72a16eb4e1b1f6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page