--- id: pytest-excel version: "1.8.1" license: MIT license_treatment: permissive maintenance: active --- # pytest-excel — pytest plugin for generating excel reports License: permissive · Maintenance: active · Downloads: 266.2K/mo ## 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 above — 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 pip install pytest-excel uv add pytest-excel 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_current - Install friction: low - Maintenance: active - Downloads: 266.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags pytest excel report generator, test results to excel, pytest xls output, automated test reporting excel, pytest report plugin, test execution excel export, pytest xlsx reporting, test-reporting, excel-export [View on SkillFed](https://skillfed.io/packages/pytest-excel) · [View on PyPI](https://pypi.org/project/pytest-excel/)