Pytest-reporter-html1 is a basic HTML report template for Pytest, leveraging the Jinja2 template engine. It extends `pytest-reporter` to generate rich, expandable reports covering test files, phases, and detailed test information. The current version is 0.9.5, and it maintains an active release cadence for bug fixes and feature enhancements.
pip install pytest-reporter-html1No compatibility data collected yet for this library.
To generate an HTML report, run pytest with the `--template` and `--report` command-line options. The `--template` argument specifies the template to use (here, `html1/index.html`), and `--report` defines the output path and filename for the generated HTML report. By default, the report is self-contained. Use `--split-report` to separate assets like CSS and JavaScript.
Always use `--report=report.html` to specify the output file and `--template=html1/index.html` to select the HTML1 template with `pytest-reporter-html1`.
Implement a custom `pytest_runtest_makereport` hook in your `conftest.py` to capture and attach screenshot data to the report context, using the provided `asset` filter in your custom Jinja2 template.
Upgrade `pytest-reporter-html1` to version 0.8.x or newer to resolve this warning. The issue was closed as completed, indicating a fix was implemented.
Change the command-line argument from `--html=report.html` to `--report=report.html` and ensure you also specify `--template=html1/index.html`. Example: `pytest --template=html1/index.html --report=report.html`.
Check for open issues on the `pytest-reporter-html1` GitHub repository, ensure all related plugins (e.g., `pytest`, `pytest-reporter`) are up-to-date, and consider simplifying complex test data structures if a minimal reproducible example can be created. If the issue persists, filing a bug report with a minimal reproducible example is recommended.