Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

PyPI release Issues License

A pytest plugin to display BDD info in the pytest-html-generated HTML test report.

Apart from pytest-html, it plugs into pytest-bdd plugin’s hooks.

Usage

To use the plugin, just install it:

# source .venv/bin/activate
pip install pytest-bdd-html
pytest -vv ...

If you use tox, list the plugin as a dependency:

; tox.ini
[testenv]
deps = ...
    pytest-bdd-html

commands = pytest -vv ...

There will be a new 3rd column with label “Description” in the test report specified by --html=... command line option of pytest-html.

Command line options

Available command line options are as follows.

--bdd-html-css=PATH

Specifies a path to a custom CSS file for styling of the Description column. pytest_bdd_html/resources/style.css is used by default if PATH does not exist or is not specified. See CSS classes for how the column cells are structured.

CSS classes

For each test case (one row in the pytest-html-generated HTML report), the Description column’s cell has one of the following structures, differing for BDD and non-BDD tests (.XXX denotes a HTML element with CSS class="XXX").

Structure of cell for BDD test

.col-description
  .col-description-bdd-doc
    /* Feature */
    div
      h3
      .text
         div /* feature name */
         div /* feature description; optional */

    /* Scenario */
    div
      h3
      .text

    /* Steps */
    div
      h3
      .steps
        .step /* one or more steps */
          .step-name
          .step-message

Structure of cell for non-BDD test with functional comment

.col-description
  .col-description-func-doc

Structure of cell for non-BDD test without functional comment

.col-description
  .col-description-no-doc /* an empty div */

Version update

bumpver test -p 0.1.13a0 "MAJOR.MINOR.PATCH[PYTAGNUM]"
bumpver update -n -d -p
bumpver update -n -p

Release files for pytest-bdd-html 0.1.14a0

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-bdd-html 0.1.14a0
File Size Uploaded
pytest-bdd-html-0.1.14a0.tar.gz 5.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pytest-bdd-html 0.1.14a0
File Interpreter ABI Platform
pytest_bdd_html-0.1.14a0-py3-none-any.whl Python 3 none any Details

Total release size: 12.0 kB

Release files / pytest-bdd-html-0.1.14a0.tar.gz

Download URL pytest-bdd-html-0.1.14a0.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e32e1ca26f54a783fcdc31749067bc5c55912f9b574f84e92ee360dadb58311f
BLAKE2b-256 checksum
How to use checksums
452c5bb6301e2fdf2515fd7a5cd327dc946e487e45fdd2b43571b2fe04e329fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.15

Release files / pytest_bdd_html-0.1.14a0-py3-none-any.whl

Download URL pytest_bdd_html-0.1.14a0-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5137e7ae30d139e4370065a35226010899561337a8062381e5b35377c412969e
BLAKE2b-256 checksum
How to use checksums
0ba7405429fd09891b7e2e1b99e19990b283697899ee5b555c4e0da30872f972
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.15
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