Human-friendly pytest test reports with optional LLM annotations
Project description
pytest-llm-report
Human-friendly pytest test reports with optional LLM annotations.
Features
- Test inventory with status (pass/fail/skip/xfail) and duration
- Per-test covered files and line ranges (using pytest-cov + coverage contexts)
- Per-file source coverage summary (covered/missed/percentage)
- Optional LLM-generated annotations:
- Scenario: What the test verifies
- Why needed: What regression/bug it prevents
- Key assertions: Critical checks performed
- HTML and JSON output formats
- Dark mode support (auto-detects system preference)
- Optional PDF generation
- Detailed Versioning: Reports include exact plugin and repository versions (plus Git SHA/dirty status) for reproducibility
- Aggregation across multiple test runs (see Aggregation)
Installation
pip install pytest-llm-report
Or with uv:
uv add pytest-llm-report
Optional Dependencies
Install additional features as needed:
# Ollama provider
pip install pytest-llm-report[ollama]
# Gemini provider
pip install pytest-llm-report[gemini]
# LiteLLM provider (supports OpenAI, Anthropic, etc.)
pip install pytest-llm-report[litellm]
# PDF generation
pip install pytest-llm-report[pdf]
# All features
pip install pytest-llm-report[all]
With uv:
uv add "pytest-llm-report[ollama]" # or gemini, litellm, pdf, all
Quick Start
Run pytest with coverage contexts enabled:
pytest --cov=your_package --cov-branch --cov-context=test --llm-report=report.html
Configuration
Configure via pyproject.toml:
[tool.pytest_llm_report]
provider = "none" # "none", "ollama", "litellm", or "gemini"
report_json = "reports/pytest_llm_report.json"
Documentation
📖 Full documentation: palakpsheth.github.io/pytest-llm-report
Requirements
- Python 3.11+
- pytest >= 7.0.0
- pytest-cov >= 4.0.0
Contributing
Contributions are welcome! Please see:
- Contributing Guide - Development setup and guidelines
- Code of Conduct - Community guidelines
- Security Policy - Reporting vulnerabilities
- Changelog - Version history
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytest_llm_report-0.1.1.tar.gz.
File metadata
- Download URL: pytest_llm_report-0.1.1.tar.gz
- Upload date:
- Size: 93.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.25 {"installer":{"name":"uv","version":"0.9.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f7a4c71388c16b975fab2d9883a1834121ff633819d1ee38ba7e452385af1b65
|
|
| MD5 |
df52baf2ca1ec1da7c4cb88fd10f8b98
|
|
| BLAKE2b-256 |
37f9a11d985af954ba1516ce22112da7d39f934cb1ffc42759e69ef842e2444e
|
File details
Details for the file pytest_llm_report-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pytest_llm_report-0.1.1-py3-none-any.whl
- Upload date:
- Size: 63.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.25 {"installer":{"name":"uv","version":"0.9.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dddb7fa71f3cd2c804c1caabbaac22834a192cb93d454037adb76fa1c1c611d6
|
|
| MD5 |
abcae045d1debb634fcdc5fd8a547a3b
|
|
| BLAKE2b-256 |
16f862642f76ffaa50fb93c4b2cc59472112f1aa12eedeacfd0e4ddf96a412c2
|