pytest-excel
pytest plugin for generating excel reports
What it is and what it does
pytest-excel is a pytest plugin that captures test execution results and writes them to Excel (.xls) files. It integrates directly into pytest's test collection and execution pipeline, allowing you to generate structured reports without modifying your test code. The plugin depends on openpyxl for Excel file creation and pandas for data handling.
You invoke it by passing --excelreport=filename.xls to pytest; it supports verbose output (one test per line) and test collection-only mode (--collect-only) to document test structure without running them. Timestamp-based filenames are also supported via strftime formatting in the filename argument.
Use it for:
- Generate Excel test reports for stakeholders who prefer spreadsheet formats over terminal output.
- Archive test results over time in a structured format for trend analysis and regression tracking.
- Export test documentation by running pytest with --collect-only to list all tests in a workbook.
- Integrate test reporting into CI/CD pipelines where Excel files are ingested by downstream tools.
- Create timestamped test reports automatically for each test run without manual file management.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A pytest plugin that generates Excel reports from test execution results, capturing test outcomes and metadata into .xls files with optional verbose formatting.
Yes. The plugin is actively maintained, has no known vulnerabilities, low install friction, and a clear use case for teams that need Excel-formatted test reports. Install it if your workflow or stakeholders require test results in spreadsheet form; skip it if terminal or JSON reporting suffices.
Install
pytest-excel on PyPI
pip
pip install pytest-exceluv
uv add pytest-excelpoetry
poetry add pytest-excelInstalling pytest-excel
Before you install
Low friction install with three straightforward runtime dependencies. Actively maintained as of 2026-04-14, marked Production/Stable, and supports current Python versions (3.11+).
License in practice
MIT license permits unrestricted use, modification, and distribution in both open and closed projects with minimal obligations.
Quickstart
pip install pytest-excel openpyxl
Then run tests with:
py.test --excelreport=report.xls
For verbose output:
py.test --verbose --excelreport=report.xls
Requires Python 3.11 or above; openpyxl must be installed alongside pytest-excel.
Verify before relying
- Whether the plugin handles test parameterization and fixtures in the Excel output.
- Performance characteristics with large test suites (thousands of tests).
- Compatibility with pytest plugins that also modify test reporting.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.11) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — openpyxl, pandas, pytest |
| Maintenance | actively maintained — 388 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 266,185/month — #8,305 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pytest_excel-1.8.1-py3-none-any.whl
Keywords: excel, pytest, report
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytest-htmlGenerates HTML reports for pytest test results,…
copyleft · top 1,000 on PyPI
pytest-tinybirdA pytest plugin that automatically posts test…
permissive · top 15,000 on PyPI
pytest-progressA pytest plugin that displays real-time test…
permissive · top 15,000 on PyPI
pytest-md-reportA pytest plugin that generates test outcome…
permissive · top 15,000 on PyPI
allure-pytestIntegrates pytest with Allure Report to…
permissive · top 5,000 on PyPI
pytest-metadataA pytest plugin that captures and exposes test…
copyleft · top 1,000 on PyPI
pytest-jsonA pytest plugin that generates JSON reports of…
permissive · top 15,000 on PyPI
qase-pytestA pytest plugin that reports test results to…
permissive · top 15,000 on PyPI
pytest-sugarA pytest plugin that improves test output with…
permissive · top 5,000 on PyPI
pytest-nunitA pytest plugin that generates NUnit3-format…
permissive · top 15,000 on PyPI