skillfed

pytest-excel

pytest plugin for generating excel reports

pytest-excel v1.8.1 266.2K downloads/30d#8,305 on PyPI16
Permissive license MIT Active released

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-excel

uv

uv add pytest-excel

poetry

poetry add pytest-excel

Installing 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

Development Status :: 5 - Production/StableFramework :: PytestIntended Audience :: DevelopersNatural Language :: EnglishOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Quality AssuranceTopic :: Software Development :: TestingTopic :: Utilities

Tags

pytest excel report generatortest results to excelpytest xls outputautomated test reporting excelpytest report plugintest execution excel exportpytest xlsx reporting
test-reportingexcel-export

More Utilities packages