Pytest Pulse — Pytest Report & Playwright Python Report Generator

PyPI Version License: MIT PyPI Downloads

The ultimate Pytest reporter for Playwright — an interactive dashboard with historical trend analytics, CI/CD-ready standalone HTML reports, and full support for parallel execution and sharding.

Core Features

Features Diagram
  • Interactive Dashboard: A rich, single-page application to visualize test results. Filter by status, browser, or test name. Expand test cases to see detailed steps (recorded via @step decorator or pulse_step fixture), errors, console logs, and attachments.
  • Historical Trend Analysis: Automatically archives test runs to track performance over time. View trends for test volume, pass/fail rates, and execution duration.
  • Standalone HTML Reports: Generate fully self-contained HTML reports with embedded attachments (screenshots, videos), perfect for sharing and CI/CD artifacts.
  • Emailable Summaries: Automatically generate and send lightweight email reports with key statistics to stakeholders.
  • Full Sharding & Parallel Support: Natively handles distributed test execution (pytest-xdist) and can merge reports from all shards into a single, comprehensive report.
  • AI-Powered Analysis: Provides insights on test flakiness, performance bottlenecks, and failure patterns directly in the dashboard.

Installation

# Using pip
pip install pytest-pulse-report

Initial Configuration

Add the reporter to your pytest.ini file or pass it as a CLI argument.

✨ Tip: Use pytest.ini for a clean setup that applies to all test runs.
# pytest.ini
[pytest]
addopts = 
    --pulse-report
    --pulse-output-dir=pulse-report
    --pulse-description="Pulse E2E Validation Suite"
    --browser chromium 
    --screenshot on 
    --video on
    --tracing on

Ensure you have pytest-playwright installed for browser-specific features.

Generating Your First Report

  1. Run your tests: Execute your pytest tests.
    pytest

    This command will run your tests and the Pytest Pulse Reporter will automatically collect data in the background, creating a pulse-report directory.

  2. Generate the HTML report: After the test run is complete, use the provided CLI command to generate the interactive HTML file.
    generate-pulse-report

    This creates a self-contained static file named playwright-pulse-static-report.html inside the pulse-report directory.

  3. View your report: Open the newly generated HTML file in your browser to explore the dashboard.

Next Steps

Now that you have your first report, explore more advanced features:

  • Step Recording Guide: Learn how to use @step and pulse_step to organize your tests.
  • Reporters & Scripts: Discover the full potential of the generate-pulse-report and merge-pulse-report commands.
  • CI Sharding: Scale your tests across multiple nodes and merge results seamlessly.