Automated responsive screenshot and reporting engine
Project description
PixelFrame
Professional Visual Regression & Responsive Testing Engine
Features • Installation • Usage • CI Integration • Contributing
Overview
PixelFrame is a high-performance CLI tool designed for frontend teams to automate responsive screenshot capture, generate detailed reports, and perform visual regression testing. It provides a structured, automation-first approach to verifying UI consistency across dozens of devices and viewports.
Features
- Multi-Breakpoint Capture: Capture high-fidelity screenshots across mobile, tablet, and desktop viewports in a single run.
- Smart Emulation: Built-in library of 15+ device presets (iPhone 15, MacBook Pro, etc.) with support for device scale factors and touch.
- YAML Configuration: Manage complex test suites using clean, version-controlled configuration files.
- Visual Regression: Pixel-perfect diffing with red-highlighted heatmaps and automated similarity scoring.
- Portable Reports: Self-contained HTML reports with embedded images for easy sharing and documentation.
- CI Ready: Integrated exit codes, JSON output, and GitHub Action templates for automated regression gating.
Installation
1. Prerequisites
PixelFrame requires Python 3.10 or higher.
2. Setup
# Clone the repository
git clone https://github.com/nijil71/PixelFrame.git
cd PixelFrame
# Create and activate virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install package
pip install -e .
playwright install chromium --with-deps
Usage
Basic Capture
Capture a website using default responsive breakpoints.
pixelframe capture run https://example.com
Device Emulation
Select specific devices from the built-in library.
pixelframe capture run https://apple.com --devices "iPhone 15, iPad Air, MacBook Pro 14"
Config-Driven Capture
Run complex audits using a YAML configuration file.
pixelframe capture run --config demo-config.yml
Visual Diffing
Compare two runs to identify visual regressions. The CLI returns exit code 1 if results fall below the threshold.
pixelframe diff run path/to/baseline path/to/latest --fail-under 98.0 --open-report
CI Integration
PixelFrame is optimized for CI/CD pipelines. Use it to automatically block pull requests that introduce visual regressions.
- name: Visual Threshold Check
run: |
pixelframe diff run ./baseline ./current --fail-under 99.0 --json
Device Library
Run pixelframe devices list for the full directory. Popular presets include:
| Category | Devices |
|---|---|
| Phones | iPhone 15 Pro Max, Galaxy S23, Pixel 8, Galaxy Z Fold 5 |
| Tablets | iPad Air, iPad Pro (11"/12.9"), Galaxy Tab S9 |
| Laptops | MacBook Air, MacBook Pro (14"/16"), Surface Pro 9 |
| Desktops | 1080p, 1440p, 4K |
Contributing
Contributions are welcome! Whether you are adding a new device preset or improving the capture engine.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pixelframe-0.3.0.tar.gz.
File metadata
- Download URL: pixelframe-0.3.0.tar.gz
- Upload date:
- Size: 17.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b1bebfa1cda884262d92e934219044b46287e9993020aafa405568462cc20f6
|
|
| MD5 |
7b3bddf976a2a70bcdb5bd45fbf51d83
|
|
| BLAKE2b-256 |
06cd34dc8073adb2637957ea96c6dc2bc9c44f09ad871b7c7a4f743c60ddd43c
|
File details
Details for the file pixelframe-0.3.0-py3-none-any.whl.
File metadata
- Download URL: pixelframe-0.3.0-py3-none-any.whl
- Upload date:
- Size: 18.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08e58c3abf64103c07bf9a71d60bdb11e19520ad49226c08d8443828e5ae6705
|
|
| MD5 |
ace0e1fea6fc59e1e2676739e41eeb86
|
|
| BLAKE2b-256 |
771f0c6a52f985183078fb2d254f4482c1e7038c2f8503e27648248ac190eff6
|