Skip to main content

Lightweight enhanced HTML reporter for Pytest

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

🧪 pytest-reporter-plus

A powerful, plug-and-play Pytest plugin to generate HTML + JSON reports, detect flaky tests, and optionally send reports via email. Works beautifully with or without xdist.

🚀 Installation

pip install pytest-reporter-plus
# or with Poetry
poetry add --dev pytest-reporter-plus

🧾 Usage

Generate HTML + JSON reports:

pytest

If you are running with xdist

pytest -n numberOfWorkers

You’ll get:

report.html – a clean, styled HTML report


✨ Features

🧩 Unified Test Reports: Get a single, easy-to-read HTML report summarizing all your test results — no hassle, just clarity.

🔄 Flaky Test Detection: Automatically flags flaky tests so you can spot and fix inconsistent failures quickly.

Screenshot 2025-05-28 at 3 43 17 PM

📸 Screenshot Support: View screenshots directly in the report to understand failures faster.

📝 Comprehensive output capture: All your test logs with loggers, print() statements, and screenshots are automatically captured and embedded in the report...

ezgif-744a5d34a4c46d

📧 Email Test Reports: Send your reports via email effortlessly using SendGrid integration.

Screenshot 2025-05-28 at 4 38 49 PM

🐢 Spot Slow Tests: Highlights the slowest tests so you know where to optimize your suite.

ezgif-64896277dcf8f8

⏱️ Sort & Filter: Easily sort tests by duration or filter by custom tags and skip status to focus on what matters.

ezgif-3056394be0e9a4

🔍 Universal Test Search + Smart Link Navigation

Whether you're trying to trace coverage or track unlinked test cases — this search has your back!

Just start typing, and the dashboard will instantly filter tests by:

✅ Test name

✅ Linked issue/documentation IDs (like JIRA, Testmo, Notion, etc.)

✅ Custom URLs or keywords present in the links

Screen Recording 2025-06-01 at 2 48 08 PM


Why use pytest-reporter-plus?

Stop wasting time writing and maintaining custom pytest reporter hooks like pytest_runtest_makereport! With pytest-reporter-plus, you get a beautiful, lightweight HTML report out of the box — no extra coding needed.

Just install, run your tests, and let the plugin handle all the reporting magic. Focus on what matters: writing and running your tests.

Available Options

Option Description Default Choices
--json-report Path to save individual JSON test reports playwright_report.json Any valid file path
--automation-tool Specify automation tool used for testing playwright playwright, selenium
--capture-screenshots When to capture screenshots failed failed, all, none
--html-output Directory to output HTML reports report_output Any valid directory
--screenshots Directory where screenshots will be stored screenshots Any valid directory
--send-email Send HTML report via email after the test run False True, False
--detect-flake Detect flaky tests based on reruns in the current or last few runs False True, False

🔁 Flaky Test Detection

If a test is retried multiple times (e.g. due to a --reruns plugin), the report will flag it as FLAKY.

In the HTML report, you’ll see a badge like:

Screenshot 2025-05-28 at 3 43 17 PM

📧 Email Report (Optional)

Send the HTML report via email using --send-email.

Setup Environment Variables

Create an emailenv file in your project folder that has the following

sender_email=you@example.com
recipient_email=team@example.com
report_path=report.html
subject=Your Test Report
smtp_server=smtp.sendgrid.net
smtp_port=587
email_password=your_sendgrid_api_key

Run

pytest --send-email

🤝 Contributions

PRs, issues, and feature requests are welcome! Let's make this tool more awesome together.

Setting up the project is pretty simple

docker build -t pytest-reporter-plus .
docker run -it pytest-reporter-plus /bin/bash 

📛 Naming

Why pytest-reporter-plus?

Because it does more than just reporting – it’s your enhanced test summary companion ✨

📜 License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest_reporter_plus-0.2.1.tar.gz (15.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytest_reporter_plus-0.2.1-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

Details for the file pytest_reporter_plus-0.2.1.tar.gz.

File metadata

  • Download URL: pytest_reporter_plus-0.2.1.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.17

File hashes

Hashes for pytest_reporter_plus-0.2.1.tar.gz
Algorithm Hash digest
SHA256 8eaa0d67ef27449cd0aa8a7b39d894e2e38c625a5b39fa52f184208ccb9a1a2a
MD5 e109e4b26c7edddf96f9ebb2ee238f7b
BLAKE2b-256 a5b36d313e4d112737f0cca869e9c0aedaf3ea4ef261ac83c012a32720860f6b

See more details on using hashes here.

File details

Details for the file pytest_reporter_plus-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_reporter_plus-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 06e9b19fc8a6e41d79f0a78dd27a530e7ab77ef5e355a025d3d42ce6c5840dd7
MD5 f8ab20bae7f8ef0d06998e4525991c33
BLAKE2b-256 5d689d1c77049f23d8adc645298f4e76f0763f829adfe4b2e5a5b6c0807a9b54

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page