All Projects → prashanth-sams → pytest-html-reporter

prashanth-sams / pytest-html-reporter

Licence: MIT license
Generates a static html report based on pytest framework

Programming Languages

HTML
75241 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to pytest-html-reporter

python-appium-framework
Complete Python Appium framework in 360 degree
Stars: ✭ 43 (-37.68%)
Mutual labels:  pytest, html-report
Gradle License Plugin
Gradle plugin that provides a task to generate a HTML license report of your project.
Stars: ✭ 246 (+256.52%)
Mutual labels:  report, html-report
ipython pytest
Pytest magic for IPython notebooks
Stars: ✭ 33 (-52.17%)
Mutual labels:  pytest
fastlane-plugin-xchtmlreport
fastlane plugin for XCTestHTMLReport
Stars: ✭ 17 (-75.36%)
Mutual labels:  html-report
covdefaults
A coverage plugin to provide sensible default settings
Stars: ✭ 38 (-44.93%)
Mutual labels:  pytest
pytest-csv
CSV reporter for pytest.
Stars: ✭ 16 (-76.81%)
Mutual labels:  pytest
pytest-datafixtures
Data fixtures for pytest made simple
Stars: ✭ 24 (-65.22%)
Mutual labels:  pytest
automation-report
Automation report是一款可以解决很多行业领域中设涉及到报告生成的需求,本项目最开始的初衷是为公司内部简化人工流程的一个环节,主要实现目的是将实验室检测得出的下机数据结果与对应的报告模版批量结合生成报告(.pdf)。
Stars: ✭ 13 (-81.16%)
Mutual labels:  report
sarna
Security Assessment Report geNerated Automatically
Stars: ✭ 26 (-62.32%)
Mutual labels:  report
phpjasperxml
This is a php wysiwyg report library
Stars: ✭ 37 (-46.38%)
Mutual labels:  report
pytest-testrail
pytest plugin for integration with TestRail, for creating testruns and updating results
Stars: ✭ 88 (+27.54%)
Mutual labels:  pytest
django-survey
A django survey app that can export results as CSV or PDF using your native language.
Stars: ✭ 178 (+157.97%)
Mutual labels:  report
awesome-newman-html-template
😎 A newman html report very detailed
Stars: ✭ 63 (-8.7%)
Mutual labels:  report
pytest-elk-reporter
A plugin to send pytest test results to ELK stack
Stars: ✭ 17 (-75.36%)
Mutual labels:  pytest
pytest-mongodb
pytest plugin for mocking MongoDB with fixtures
Stars: ✭ 56 (-18.84%)
Mutual labels:  pytest
nuts
NUTS defines a desired network state and checks it against a real network using pytest and nornir.
Stars: ✭ 47 (-31.88%)
Mutual labels:  pytest
publishing-python-packages
Examples and exercises for Publishing Python Packages from Manning Books 🐍 📦 ⬆️
Stars: ✭ 25 (-63.77%)
Mutual labels:  pytest
kirby-backup-widget
Kirby panel widget to easily backup your site content.
Stars: ✭ 25 (-63.77%)
Mutual labels:  archive
python-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.
Stars: ✭ 44 (-36.23%)
Mutual labels:  pytest
zipit
Decentralized or self-hosted encryption archives that work on any internet device.
Stars: ✭ 14 (-79.71%)
Mutual labels:  archive

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

$ pip3 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, filename, and title

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

Add --title tag followed by the report title:

$ pytest tests/ --html-report=./report --title='PYTEST REPORT'

Add --archive-count tag followed by an integer to limit showing the number of builds in the Archives section:

$ pytest tests/ --archive-count 7
$ pytest tests/ --html-report=./report --archive-count 7
pytest.ini

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

[pytest]
addopts = -vs -rf --html-report=./report --title='PYTEST 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://img.shields.io/badge/Attach_screenshot_snippet-000?style=for-the-badge&logo=ko-fi&logoColor=white

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/
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].