{"id":20999,"library":"behave-html-formatter","title":"behave-html-formatter","description":"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.","status":"active","version":"0.9.10","language":"python","source_language":"en","source_url":"https://github.com/behave-contrib/behave-html-formatter","tags":["behave","bdd","testing","html-report","formatter"],"install":[{"cmd":"pip install behave-html-formatter","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Runtime dependency: the formatter integrates with Behave and requires it to be installed.","package":"behave","optional":false}],"imports":[{"note":"The correct package name is 'behave_html_formatter' (underscore). The old or incorrect import path is under 'behave_contrib' which does not exist.","wrong":"from behave_contrib.formatter import HTMLFormatter","symbol":"HTMLFormatter","correct":"from behave_html_formatter import HTMLFormatter"}],"quickstart":{"code":"pip install behave behave-html-formatter\n\n# In your features/ directory, add or modify behave.ini:\n[behave]\nformat = html\noutfile = reports/report.html\n\n# Then run behave:\nbehave","lang":"bash","description":"Install the formatter, configure Behave to use it, then run tests."},"warnings":[{"fix":"Use `behave --format html --outfile report.html` or set in behave.ini: `format = pretty,html` if you want both console and HTML output.","message":"The formatter only generates HTML output when the 'html' format is specified. If multiple formats are used, ensure you include 'html'.","severity":"gotcha","affected_versions":"all"},{"fix":"Always use absolute paths or ensure the relative path matches your project layout. Example: `behave --format html --outfile /absolute/path/report.html`","message":"The 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.","severity":"gotcha","affected_versions":"all"},{"fix":"Upgrade to >=0.9.9 to get proper CSS and JS handling.","message":"Version 0.9.10 fixed CSS issues, but older versions (<=0.9.7) had broken CSS and missing JavaScript minification which could corrupt the report.","severity":"deprecated","affected_versions":"<0.9.8"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Use the correct import: `from behave_html_formatter import HTMLFormatter`","cause":"Using wrong import path: `from behave_contrib import HTMLFormatter` instead of `from behave_html_formatter import HTMLFormatter`.","error":"ImportError: cannot import name 'HTMLFormatter'"},{"fix":"Run `pip install behave-html-formatter`","cause":"The `behave-html-formatter` package is not installed.","error":"ModuleNotFoundError: No module named 'behave_html_formatter'"},{"fix":"Install with `pip install behave-html-formatter` and ensure it's available in the environment. Then the 'html' format will appear.","cause":"Behave does not have the built-in 'html' formatter; the behave-html-formatter package must be installed and registered.","error":"behave: error: argument --format: invalid choice: 'html' (choose from 'json', 'plain', 'pretty', 'progress', 'rerun', 'steps', 'tags')"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}