skillfed

behavex-images

BehaveX extension library to attach images to the test execution report.

behavex-images v3.3.1 145.3K downloads/30d#11,128 on PyPI1
Permissive license MIT AGING released

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-images

uv

uv add behavex-images

poetry

poetry add behavex-images

Installing 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

Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Testing

Tags

behave test report imagesbehavex html report screenshotsattach images to test reportsbehave screenshot attachmenttest report image integrationbehavex image extensionautomated test report images
test-reportingbehave-extensionscreenshot-capture

More Testing packages