Registry / testing / behave-html-formatter

behave-html-formatter

JSON →
library0.9.10pypypi✓ verified 85d ago

HTML formatter for Behave (BDD test framework). Renders test results as a standalone HTML report. Current version 0.9.10, with infrequent releases. Compatible with Python >=3.6 and Behave.

pip install behave-html-formatter
INSTALL
IMPORT
SIG · BEHAVE-HTML-FORMAT
B
behave-html-formatter
testingpythonv0.9.10
Install
2.4s avg
Import
388ms
Disk
19MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.9.10 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.406s · 20.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.4s · import 0.370s · 21MB
19MB installed
● package 19MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

HTMLFormatter
from behave_html_formatter import HTMLFormatter
from behave_contrib.formatter import HTMLFormatter
The correct package name is 'behave_html_formatter' (underscore). The old or incorrect import path is under 'behave_contrib' which does not exist.

Install the formatter, configure Behave to use it, then run tests.

pip install behave behave-html-formatter # In your features/ directory, add or modify behave.ini: [behave] format = html outfile = reports/report.html # Then run behave: behave
Debug
Known issues
gotchaThe formatter only generates HTML output when the 'html' format is specified. If multiple formats are used, ensure you include 'html'.
fix
Use `behave --format html --outfile report.html` or set in behave.ini: `format = pretty,html` if you want both console and HTML output.
affects: all
gotchaThe output file path specified in `--outfile` is relative to the current working directory, not the feature directory. In behave.ini, the path is also relative to the project root.
fix
Always use absolute paths or ensure the relative path matches your project layout. Example: `behave --format html --outfile /absolute/path/report.html`
affects: all
deprecatedVersion 0.9.10 fixed CSS issues, but older versions (<=0.9.7) had broken CSS and missing JavaScript minification which could corrupt the report.
fix
Upgrade to >=0.9.9 to get proper CSS and JS handling.
affects: <0.9.8
Errors
Common errors & fixes
ImportError: cannot import name 'HTMLFormatter'
Using wrong import path: `from behave_contrib import HTMLFormatter` instead of `from behave_html_formatter import HTMLFormatter`.
fix
Use the correct import: `from behave_html_formatter import HTMLFormatter`
ModuleNotFoundError: No module named 'behave_html_formatter'
The `behave-html-formatter` package is not installed.
fix
Run `pip install behave-html-formatter`
behave: error: argument --format: invalid choice: 'html' (choose from 'json', 'plain', 'pretty', 'progress', 'rerun', 'steps', 'tags')
Behave does not have the built-in 'html' formatter; the behave-html-formatter package must be installed and registered.
fix
Install with `pip install behave-html-formatter` and ensure it's available in the environment. Then the 'html' format will appear.
Upgrade
Version history
0.9.10latest on PyPI · released Jun 30, 2022
Audit
Dependencies
behaverequiredRuntime dependency: the formatter integrates with Behave and requires it to be installed.
Agent activity
15 hits · last 30 days
node
12
OpenAI (training)
1
Resources
behave-html-formatter — pip install behave-html-formatter · libregistry