skillfed

pytest-csv

CSV output for pytest.

pytest-csv v3.0.0 551.9K downloads/30d#6,046 on PyPI21
Copyleft license GPLv3 Abandoned released

What it is and what it does

pytest-csv is a pytest plugin that captures test execution results and writes them to a CSV file instead of (or in addition to) the standard pytest output. It provides fine-grained control over which test metadata columns to include—such as test name, status, duration, markers, parameters, and system information—and allows customization of CSV formatting options like delimiter and quote character.

The plugin is useful for test result aggregation, reporting, and analysis workflows where you need structured data rather than human-readable console output. It integrates directly into pytest's execution model via command-line flags and supports dynamic column generation through conftest.py hooks, allowing you to record custom properties from individual tests.

Use it for:

  • Export test results to CSV for import into spreadsheets or data analysis tools for trend analysis and reporting.
  • Capture test execution metrics (duration, status, parameters) in a structured format for CI/CD pipeline integration.
  • Generate test reports that include system and environment information (host, Python version, OS) alongside test outcomes.
  • Record custom test properties and markers as separate CSV columns for detailed test categorization and filtering.
  • Automate test result aggregation across multiple test runs for historical tracking and performance monitoring.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

A pytest plugin that exports test results to CSV format with customizable columns, delimiters, and the ability to include test metadata like duration, status, markers, and parameters.

Yes, if you have a stable test suite and need CSV output for reporting or data analysis. No, if you require ongoing maintenance, compatibility with the latest pytest versions, or support for new features—the project is abandoned (last release April 2021) and shows no signs of active development. Evaluate whether your pytest version and Python environment are compatible before committing to it in a new project.

Install

pytest-csv on PyPI

pip

pip install pytest-csv

uv

uv add pytest-csv

poetry

poetry add pytest-csv

Installing pytest-csv

Before you install

Low install friction with only two runtime dependencies (pytest and six). However, the package is abandoned—last release was 2021-04-22, over 1940 days ago, with no recent commits. Use only if your test infrastructure is stable and you do not expect ongoing maintenance or compatibility updates.

License in practice

Licensed under GPLv3 (copyleft). Any project that uses this plugin must comply with GPLv3 terms, including making source code available under the same license if distributed. This is a significant constraint for proprietary or closed-source projects.

Quickstart

pip install pytest-csv

py.test --csv tests.csv

# With custom columns:
py.test --csv results.csv --csv-columns host,function,status,duration

Verify before relying

  • Whether the plugin remains compatible with pytest versions released after 2021-04-22, particularly recent major versions.
  • Whether the six dependency is still necessary or if it can be removed for modern Python 3 environments.

Package facts

License GPLv3 (copyleft)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 2 — pytest, six
Maintenance abandoned — 1,940 days since the last release
Last repo commit
First released
Downloads 551,864/month — #6,046 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pytest_csv-3.0.0-py2.py3-none-any.whl

Keywords: py.test, pytest, csv, tsv, report

Framework :: PytestLicense :: OSI Approved :: GNU General Public License (GPL)Operating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIXOperating System :: UnixProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy

Tags

pytest csv exporttest results to csvpytest report csvcsv test outputpytest test reportingtest metrics csvpytest tsv export
test-reportingcsv-exportabandoned

More Testing packages