Skip to main content

pytest-html-reporter

Join the chat at https://gitter.im/prashanth-sams/pytest-html-reporter PyPI version Build Status https://coveralls.io/repos/github/prashanth-sams/pytest-html-reporter/badge.svg?branch=master Downloads

Generates a static html report based on pytest framework

pytest-html-reporter

Features

  • Generic information
    • Overview

    • Trends

    • Suite Highlights

    • Test suite details

  • Archives / History

  • Screenshots on failure

  • Test Rerun support

Installation

$ pip install pytest-html-reporter

Usage

By default, the filename used is pytest_html_reporter.html and path chosen is report; you can skip both or either one of them if not needed:

$ pytest tests/

Custom path and filename

Add --html-report tag followed by path location and filename to customize the report location and filename:

$ pytest tests/ --html-report=./report
$ pytest tests/ --html-report=./report/report.html

pytest.ini

Alternate option is to add this snippet in the pytest.ini file:

[pytest]
addopts = -vs -rf --html-report=./report

Note: If you fail to provide --html-report tag, it consider your project’s home directory as the base

screenshots on failure

Import attach from the library and call it with the selenium command as given below:

from pytest_html_reporter import attach

...
attach(data=self.driver.get_screenshot_as_png())
https://i.imgur.com/1HSYkdC.gif

Is there a demo available for this gem?

Yes, you can use this demo as an example, https://github.com/prashanth-sams/pytest-html-reporter:

$ pytest tests/functional/

Metadata

Release files for pytest-html-reporter 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytest-html-reporter 0.2.3
File Size Uploaded Provenance Actions
pytest-html-reporter-0.2.3.tar.gz 22.5 kB Without provenance Details for pytest-html-reporter-0.2.3.tar.gz

Release files / pytest-html-reporter-0.2.3.tar.gz

Download URL pytest-html-reporter-0.2.3.tar.gz
Size 22.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b7502c09e6934f0ef17392c1a36046da475e0f3bd5099cf292ff483eed314543
BLAKE2b-256 checksum
How to use checksums
cacb3064f17d49adf6a71ae03711f4722dbc2e12677f58eb8b017ff566219ea4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.2

Security for pytest-html-reporter 0.2.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.3 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page