Vision-driven UI Testing Framework
Project description
vizQA: Vision-Driven Web UI Testing Framework
vizQA is a lightweight, next-generation UI testing framework that "sees" and interacts with your application like a human does. By combining Playwright's robust automation with advanced visual perception and semantic search, vizQA allows you to write tests in natural language without brittle CSS selectors or XPath—all running efficiently on CPU without the need for LLMs.
[!IMPORTANT] vizQA is currently in its early alpha stage. We are actively developing and refining the framework. Feedback, bug reports, and contributions are highly encouraged and welcome! Please review our CONTRIBUTING.md to get started.
👁️ Why Vision-Driven?
Traditional UI testing relies on the underlying DOM structure. When a developer changes a class name or wraps an element in a new div, tests break—even if the UI looks identical to the user.
vizQA changes the paradigm by focusing on the visual reality:
- Natural Language: Write tests like "Click the login button" or "Verify the error message appears in red".
- Visual Intelligence: Understands visual rules such as contrast against background, salience (how much an element stands out), and spatial semantics ("the button at the top right").
- Real-World Verification: Verifies reachability, visibility, and detects obstruction (e.g., an element being covered by a modal or tooltip).
- Semantic Understanding: Finds elements based on intent and visual appearance, not just hidden attributes.
Key Features
- Natural Language Steps: Define your test flow in simple YAML instructions.
- Advanced Interactions: Supports
click,hover,type,scroll, and evendrag and drop. - Visual Assertions: Verify UI state, colors, positions, and visibility.
- Artifact Variables: Load strings, file contents, or paths as variables (e.g.,
{user_name}) for dynamic test data. - Lightweight & Fast: CPU-only execution with a minimal ~250 MB memory footprint and sub-second latency.
🚀 Getting Started
Prerequisites
-
Python 3.11+
-
Playwright
-
UI Perception Backend: vizQA requires a perception backend. You can run the official lightweight UI-Atlas docker image for cully local operation:
docker run -d -p 8228:8000 --name ui-atlas tinyreasonlabs/ui-atlas:latest
Learn more about UI-Atlas on Dockerhub
vizQA connects to the backend using the
PERCEPTION_BACKENDenvironment variable:- Default:
localhost:8228 - Example:
export PERCEPTION_BACKEND=localhost:8228
- Default:
Installation
pip install vizqa
vizqa install
📝 Usage
Define a Test (login_test.yaml)
name: "User Login Flow"
url: "https://example.com/login"
description: "Verify that a user can log in with valid credentials."
steps:
- action: "Type 'admin' into the username field"
expect: "The username field should contain 'admin'"
- action: "Type 'password123' into the password field"
- action: "Click the 'Login' button"
expect: "Should redirect to the dashboard and show 'Welcome back!'"
Run the Test
# Run all tests in a directory
vizqa tests/
CLI Arguments
| Argument | Description | Default |
|---|---|---|
paths |
One or more paths to test files or directories. | (Required) |
--headless / --no-headless |
Run browser in headless mode. | True |
-v, --verbose |
Increase output verbosity (-v, -vv). | 0 |
-x, --interactive |
Stop and enter interactive mode on first failure. | False |
--report |
Generate a visual HTML report after execution. | False |
Configuration
vizQA supports global and per-test configuration, including custom HTTP headers for authentication or specialized testing.
Global Configuration
You can define global headers in your pyproject.toml or any common .ini file (e.g., pytest.ini, tox.ini).
pyproject.toml
[tool.vizqa.headers]
Authorization = "Bearer global-api-token"
X-Custom-Header = "GlobalValue"
pytest.ini / vizqa.ini
[vizqa.headers]
Authorization = Bearer global-api-token
X-Custom-Header = GlobalValue
Per-Test Overrides
You can specify or override headers directly in your test YAML file. These take precedence over global settings.
my_test.yaml
name: "Protected API Test"
url: "https://example.com/api"
headers:
Authorization: "Bearer test-specific-token"
steps:
- VERIFY: "Welcome" should appear
Methodology
vizQA follows a three-stage execution cycle for every step:
- Perception: Takes a screenshot and sends it to the Perception API to identify all visual elements and their properties (bounds, text, color, state).
- Planning: Uses semantic matching to understand intent and internally breaks down high-level instructions into atomic
find,do, andverifycommands to handle complex interactions. - Execution: Performs the interaction via Playwright using precise pixel coordinates, ensuring we interact exactly with what was "seen."
Contributing
We welcome contributions! Please see our CONTRIBUTING.md for details on setting up the environment and submitting PRs.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
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 vizqa-0.1.0.tar.gz.
File metadata
- Download URL: vizqa-0.1.0.tar.gz
- Upload date:
- Size: 61.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef608874da20a6456978d79bdb2ee2ce147000c1c335bf2fd0e3e9bf13920070
|
|
| MD5 |
15c1fbd843fa0d038decc93dbfa34636
|
|
| BLAKE2b-256 |
21f67d9244a0d4f365f859a9e8d382fa4f14a28c41077917864d826230a0cc61
|
Provenance
The following attestation bundles were made for vizqa-0.1.0.tar.gz:
Publisher:
release.yml on TinyReasonLabs/vizQA
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vizqa-0.1.0.tar.gz -
Subject digest:
ef608874da20a6456978d79bdb2ee2ce147000c1c335bf2fd0e3e9bf13920070 - Sigstore transparency entry: 1228818670
- Sigstore integration time:
-
Permalink:
TinyReasonLabs/vizQA@d3403f9cd9a7b8c01f179e89c145294a81b0dd40 -
Branch / Tag:
refs/heads/release/0.1.0 - Owner: https://github.com/TinyReasonLabs
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d3403f9cd9a7b8c01f179e89c145294a81b0dd40 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file vizqa-0.1.0-py3-none-any.whl.
File metadata
- Download URL: vizqa-0.1.0-py3-none-any.whl
- Upload date:
- Size: 70.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98966f527213233fdfba88f64995611438ad691cfc6b1356245ae1d1cef7ca77
|
|
| MD5 |
88768aed7c5ca213f5c24871c8c0ec74
|
|
| BLAKE2b-256 |
2c950206cf3621e6d3221c2611452c908b074366438505af94a01b7e5260409c
|
Provenance
The following attestation bundles were made for vizqa-0.1.0-py3-none-any.whl:
Publisher:
release.yml on TinyReasonLabs/vizQA
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vizqa-0.1.0-py3-none-any.whl -
Subject digest:
98966f527213233fdfba88f64995611438ad691cfc6b1356245ae1d1cef7ca77 - Sigstore transparency entry: 1228818682
- Sigstore integration time:
-
Permalink:
TinyReasonLabs/vizQA@d3403f9cd9a7b8c01f179e89c145294a81b0dd40 -
Branch / Tag:
refs/heads/release/0.1.0 - Owner: https://github.com/TinyReasonLabs
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d3403f9cd9a7b8c01f179e89c145294a81b0dd40 -
Trigger Event:
workflow_dispatch
-
Statement type: