--- id: pytest-harvest version: "1.10.5" license: BSD 3-Clause license_treatment: permissive maintenance: aging --- # pytest-harvest — Store data created during your pytest tests execution, and retrieve it at the end of the session, e.g. for applicative benchmarking purposes. License: permissive · Maintenance: aging · Downloads: 730.5K/mo ## What it is and what it does pytest-harvest is a pytest plugin that intercepts and stores arbitrary data generated during test execution, then makes that data available after the test session ends. It's designed for scenarios where you need to collect metrics, benchmarks, or other artifacts from individual tests and analyze them as a group—rather than just pass/fail results. The package works by providing hooks into pytest's execution lifecycle. You store data during test runs (typically via fixtures or direct API calls), and pytest-harvest holds that data in memory, making it queryable once all tests complete. This is particularly useful for applicative benchmarking, where you want to gather performance numbers from many test cases and analyze them together, or for collecting structured test artifacts that need post-processing. Use it for: - Collect performance metrics from multiple test runs and generate a summary report at the end of the session. - Store custom data (e.g., API response times, memory usage) from each test for later analysis or export. - Aggregate test results into a dataframe for statistical analysis or visualization after the test suite finishes. - Benchmark different code paths across a test suite and compare results in a single report. - Archive test artifacts and metadata for post-mortem analysis without writing individual files per test. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. pytest-harvest captures and stores data generated during test execution, making it available for retrieval after the test session completes—useful for benchmarking, result aggregation, and post-test analysis. Yes, if you need to collect and aggregate data across multiple tests for benchmarking or post-test analysis. The package is production-stable, has low install friction, and carries no security vulnerabilities. The aging status (881 days since release) is a minor concern but not a blocker if pytest compatibility remains adequate; verify that it works with your pytest version before committing to it. ## Install pip install pytest-harvest uv add pytest-harvest poetry add pytest-harvest ## Installing pytest-harvest Before you install: Low install friction with six runtime dependencies; the package is aging (881 days since last release) but maintains production-stable status and the repository remains active with a recent commit. License in practice: BSD 3-Clause is permissive and poses no restrictions on commercial or private use; you may use, modify, and distribute the package freely provided you include the license notice. Quickstart: pip install pytest-harvest import pytest_harvest # In a test, store data via pytest_harvest's fixture or API # Retrieve aggregated results after session completes Verify before relying: - Whether the package works with pytest versions currently in active use - Whether the aging status (881 days since release) affects compatibility with modern test frameworks - How to access stored data programmatically after session completion ## Package facts - License: BSD 3-Clause (permissive) - Python support: unspecified - Install friction: low - Maintenance: aging - Downloads: 730.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags pytest test data collection, capture pytest results, pytest session data storage, test benchmarking pytest, pytest fixture data retrieval, pytest test metrics collection, pytest result aggregation, pytest-plugin, test-metrics, benchmarking [View on SkillFed](https://skillfed.io/packages/pytest-harvest) · [View on PyPI](https://pypi.org/project/pytest-harvest/)