Skip to content

Getting Started

Install from PyPI:

Terminal window
pip install code-covered

Run your tests with JSON coverage output:

Terminal window
pytest --cov=myapp --cov-report=json

This produces a coverage.json file in your project root.

Terminal window
code-covered coverage.json

You’ll see a prioritized list of missing tests, ranked by risk.

Write ready-to-use test stubs directly to a file:

Terminal window
code-covered coverage.json -o tests/test_gaps.py

Open the generated file, fill in the TODOs, and run your tests again.

Clone and set up a development environment:

Terminal window
git clone https://github.com/mcp-tool-shop-org/code-covered.git
cd code-covered
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e ".[dev]"
# Run tests
pytest -v
# Run with coverage
pytest --cov=analyzer --cov=mcp_code_covered --cov=cli --cov-report=term-missing
# Linting and type checking
ruff check analyzer mcp_code_covered cli.py tests
pyright analyzer mcp_code_covered cli.py tests