behavex-images
BehaveX extension library to attach images to the test execution report.
What it is and what it does
behavex-images is a small extension library that plugs into BehaveX to embed images directly into the HTML reports generated from Behave test runs. It provides four main methods: attaching images from binary data (e.g., screenshots from Selenium), attaching images from file paths, setting conditions for when images should be included (always, only on failure, or never), and clearing attached images. The library depends on BehaveX, Behave, Pillow for image handling, and filelock for concurrency safety.
You use it by importing the image_attachments module and calling its methods from within step definitions or environment hooks. It's designed to integrate seamlessly into existing BehaveX projects without requiring changes to test structure—you simply call the attachment methods at the points where you want images captured (e.g., after taking a screenshot in a Selenium test).
Use it for:
- Embed screenshots into test reports automatically after each step or only when a test fails, for visual debugging.
- Attach Selenium WebDriver screenshots to BehaveX HTML reports to document test execution state.
- Include pre-generated images (diagrams, UI mockups, reference images) in test reports for comparison or documentation.
- Set a global attachment condition in environment.py hooks to control whether images appear in all reports or only failure reports.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Attaches images to BehaveX HTML test reports, supporting both binary image data and image files with configurable attachment conditions.
Yes, if you use BehaveX and need visual evidence in test reports. Install friction is low and the library is straightforward. However, the aging maintenance status (364 days since last release, minimal repository activity) means you should verify compatibility with your BehaveX version before relying on it for production test pipelines. No known vulnerabilities.
Install
behavex-images on PyPI
pip
pip install behavex-imagesuv
uv add behavex-imagespoetry
poetry add behavex-imagesInstalling behavex-images
Before you install
Low install friction with a pure Python wheel. Maintenance status is aging—last release was 364 days ago and the repository has minimal activity (1 star), though it remains unarchived and the last commit is recent.
License in practice
MIT license is permissive and imposes no significant restrictions on use, modification, or distribution.
Quickstart
pip install behavex-images
from behavex_images import image_attachments
image_attachments.attach_image_file(context, 'path/to/screenshot.png')
Requires BehaveX and Behave to be installed; context object must be available from a BehaveX step or hook.
Verify before relying
- Whether image attachment works with all BehaveX versions or if specific version compatibility constraints exist beyond what the fact sheet indicates.
- Performance impact when attaching many images or large binary payloads to reports.
- Whether the package handles image format validation or only JPG and PNG as documented.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — behavex, behave, pillow, filelock |
| Maintenance | aging — 364 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 145,303/month — #11,128 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: behavex_images-3.3.1-py3-none-any.whl
Tags
More Testing packages
Pluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
virtualenvvirtualenv creates isolated Python environments…
permissive · top 100 on PyPI
coverageCoverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
pytest-asynciopytest-asyncio is a pytest plugin that enables…
permissive · top 1,000 on PyPI
pytest-json-ctrfA pytest plugin that generates test reports in…
permissive · top 1,000 on PyPI
behavexBehaveX extends Behave with parallel test…
unclear · top 15,000 on PyPI
allure-behaveIntegrates Behave BDD test execution with…
permissive · top 15,000 on PyPI
behave-reportportalIntegrates Behave BDD test execution with…
permissive · top 15,000 on PyPI
behavebehave is a behavior-driven development (BDD)…
permissive · top 5,000 on PyPI
pytest-html-reporterGenerates static HTML test reports from pytest…
permissive · top 15,000 on PyPI
reportportal-clientA Python client library that sends test…
permissive · top 5,000 on PyPI
behave-html-formatterGenerates HTML reports from Behave BDD test…
copyleft · top 15,000 on PyPI
percy-seleniumIntegrates Percy visual testing into Python…
permissive · top 15,000 on PyPI
html2imageGenerates PNG/image files from HTML, CSS, and…
permissive · top 15,000 on PyPI
behave-djangoIntegrates Behave BDD testing into Django…
permissive · top 15,000 on PyPI