vizQA 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
vizqa-0.1.0/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 TinyReasonLabs
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
vizqa-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,178 @@
1
+ Metadata-Version: 2.4
2
+ Name: vizQA
3
+ Version: 0.1.0
4
+ Summary: Vision-driven UI Testing Framework
5
+ License-File: LICENSE.md
6
+ Author: Spospider
7
+ Author-email: 64846609+Spospider@users.noreply.github.com
8
+ Requires-Python: >=3.11
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.11
11
+ Classifier: Programming Language :: Python :: 3.12
12
+ Classifier: Programming Language :: Python :: 3.13
13
+ Classifier: Programming Language :: Python :: 3.14
14
+ Requires-Dist: click (>=8.1.7)
15
+ Requires-Dist: httpx (>=0.27.0)
16
+ Requires-Dist: onnxruntime (>=1.24.3,<2.0.0)
17
+ Requires-Dist: playwright (>=1.58.0,<2.0.0)
18
+ Requires-Dist: pydantic (>=2.6.0)
19
+ Requires-Dist: pyyaml (>=6.0.1)
20
+ Requires-Dist: rich (>=13.7.0)
21
+ Requires-Dist: tokenizers (>=0.22.2,<0.23.0)
22
+ Requires-Dist: tomli (>=2.0.0,<3.0.0) ; python_version < "3.11"
23
+ Description-Content-Type: text/markdown
24
+
25
+ # vizQA: Vision-Driven Web UI Testing Framework
26
+
27
+ [![Python Version](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
28
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
29
+ [![Build Status](https://img.shields.io/badge/build-passing-brightgreen.svg)]()
30
+ [![Code Coverage](https://img.shields.io/badge/coverage-55%25-orange.svg)]()
31
+
32
+ **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.
33
+
34
+ > [!IMPORTANT]
35
+ > **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](CONTRIBUTING.md) to get started.
36
+
37
+
38
+ ---
39
+
40
+ ## 👁️ Why Vision-Driven?
41
+
42
+ 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.
43
+
44
+ **vizQA changes the paradigm by focusing on the visual reality:**
45
+ - **Natural Language**: Write tests like "Click the login button" or "Verify the error message appears in red".
46
+ - **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").
47
+ - **Real-World Verification**: Verifies **reachability**, **visibility**, and detects **obstruction** (e.g., an element being covered by a modal or tooltip).
48
+ - **Semantic Understanding**: Finds elements based on intent and visual appearance, not just hidden attributes.
49
+
50
+ ---
51
+
52
+ ## Key Features
53
+
54
+ - **Natural Language Steps**: Define your test flow in simple YAML instructions.
55
+ - **Advanced Interactions**: Supports `click`, `hover`, `type`, `scroll`, and even `drag and drop`.
56
+ - **Visual Assertions**: Verify UI state, colors, positions, and visibility.
57
+ - **Artifact Variables**: Load strings, file contents, or paths as variables (e.g., `{user_name}`) for dynamic test data.
58
+ - **Lightweight & Fast**: CPU-only execution with a minimal **~250 MB** memory footprint and sub-second latency.
59
+ ---
60
+
61
+ ## 🚀 Getting Started
62
+
63
+ ### Prerequisites
64
+
65
+ - **Python 3.11+**
66
+ - **Playwright**
67
+ - **UI Perception Backend**: vizQA requires a perception backend. You can run the official lightweight UI-Atlas docker image for cully local operation:
68
+ ```bash
69
+ docker run -d -p 8228:8000 --name ui-atlas tinyreasonlabs/ui-atlas:latest
70
+ ```
71
+ Learn more about [UI-Atlas on Dockerhub](https://hub.docker.com/r/tinyreasonlabs/ui-atlas)
72
+
73
+ vizQA connects to the backend using the `PERCEPTION_BACKEND` environment variable:
74
+ - Default: `localhost:8228`
75
+ - Example:
76
+ ```bash
77
+ export PERCEPTION_BACKEND=localhost:8228
78
+ ```
79
+
80
+ ### Installation
81
+
82
+ ```bash
83
+ pip install vizqa
84
+ vizqa install
85
+ ```
86
+
87
+ ---
88
+
89
+ ## 📝 Usage
90
+
91
+ ### Define a Test (`login_test.yaml`)
92
+
93
+ ```yaml
94
+ name: "User Login Flow"
95
+ url: "https://example.com/login"
96
+ description: "Verify that a user can log in with valid credentials."
97
+
98
+ steps:
99
+ - action: "Type 'admin' into the username field"
100
+ expect: "The username field should contain 'admin'"
101
+ - action: "Type 'password123' into the password field"
102
+ - action: "Click the 'Login' button"
103
+ expect: "Should redirect to the dashboard and show 'Welcome back!'"
104
+ ```
105
+
106
+ ### Run the Test
107
+
108
+ ```bash
109
+ # Run all tests in a directory
110
+ vizqa tests/
111
+ ```
112
+
113
+ ### CLI Arguments
114
+
115
+ | Argument | Description | Default |
116
+ | --- | --- | --- |
117
+ | `paths` | One or more paths to test files or directories. | (Required) |
118
+ | `--headless / --no-headless` | Run browser in headless mode. | `True` |
119
+ | `-v, --verbose` | Increase output verbosity (-v, -vv). | `0` |
120
+ | `-x, --interactive` | Stop and enter interactive mode on first failure. | `False` |
121
+ | `--report` | Generate a visual HTML report after execution. | `False` |
122
+
123
+ ---
124
+
125
+ ## Configuration
126
+
127
+ vizQA supports global and per-test configuration, including custom HTTP headers for authentication or specialized testing.
128
+
129
+ ### Global Configuration
130
+ You can define global headers in your `pyproject.toml` or any common `.ini` file (e.g., `pytest.ini`, `tox.ini`).
131
+
132
+ **`pyproject.toml`**
133
+ ```toml
134
+ [tool.vizqa.headers]
135
+ Authorization = "Bearer global-api-token"
136
+ X-Custom-Header = "GlobalValue"
137
+ ```
138
+
139
+ **`pytest.ini` / `vizqa.ini`**
140
+ ```ini
141
+ [vizqa.headers]
142
+ Authorization = Bearer global-api-token
143
+ X-Custom-Header = GlobalValue
144
+ ```
145
+
146
+ ### Per-Test Overrides
147
+ You can specify or override headers directly in your test YAML file. These take precedence over global settings.
148
+
149
+ **`my_test.yaml`**
150
+ ```yaml
151
+ name: "Protected API Test"
152
+ url: "https://example.com/api"
153
+ headers:
154
+ Authorization: "Bearer test-specific-token"
155
+ steps:
156
+ - VERIFY: "Welcome" should appear
157
+ ```
158
+
159
+ ---
160
+
161
+ ## Methodology
162
+
163
+ vizQA follows a three-stage execution cycle for every step:
164
+
165
+ 1. **Perception**: Takes a screenshot and sends it to the Perception API to identify all visual elements and their properties (bounds, text, color, state).
166
+ 2. **Planning**: Uses semantic matching to understand intent and internally breaks down high-level instructions into atomic `find`, `do`, and `verify` commands to handle complex interactions.
167
+ 3. **Execution**: Performs the interaction via Playwright using precise pixel coordinates, ensuring we interact exactly with what was "seen."
168
+
169
+ ---
170
+
171
+ ## Contributing
172
+
173
+ We welcome contributions! Please see our [CONTRIBUTING.md](CONTRIBUTING.md) for details on setting up the environment and submitting PRs.
174
+
175
+ ## License
176
+
177
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
178
+
vizqa-0.1.0/README.md ADDED
@@ -0,0 +1,153 @@
1
+ # vizQA: Vision-Driven Web UI Testing Framework
2
+
3
+ [![Python Version](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
+ [![Build Status](https://img.shields.io/badge/build-passing-brightgreen.svg)]()
6
+ [![Code Coverage](https://img.shields.io/badge/coverage-55%25-orange.svg)]()
7
+
8
+ **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.
9
+
10
+ > [!IMPORTANT]
11
+ > **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](CONTRIBUTING.md) to get started.
12
+
13
+
14
+ ---
15
+
16
+ ## 👁️ Why Vision-Driven?
17
+
18
+ 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.
19
+
20
+ **vizQA changes the paradigm by focusing on the visual reality:**
21
+ - **Natural Language**: Write tests like "Click the login button" or "Verify the error message appears in red".
22
+ - **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").
23
+ - **Real-World Verification**: Verifies **reachability**, **visibility**, and detects **obstruction** (e.g., an element being covered by a modal or tooltip).
24
+ - **Semantic Understanding**: Finds elements based on intent and visual appearance, not just hidden attributes.
25
+
26
+ ---
27
+
28
+ ## Key Features
29
+
30
+ - **Natural Language Steps**: Define your test flow in simple YAML instructions.
31
+ - **Advanced Interactions**: Supports `click`, `hover`, `type`, `scroll`, and even `drag and drop`.
32
+ - **Visual Assertions**: Verify UI state, colors, positions, and visibility.
33
+ - **Artifact Variables**: Load strings, file contents, or paths as variables (e.g., `{user_name}`) for dynamic test data.
34
+ - **Lightweight & Fast**: CPU-only execution with a minimal **~250 MB** memory footprint and sub-second latency.
35
+ ---
36
+
37
+ ## 🚀 Getting Started
38
+
39
+ ### Prerequisites
40
+
41
+ - **Python 3.11+**
42
+ - **Playwright**
43
+ - **UI Perception Backend**: vizQA requires a perception backend. You can run the official lightweight UI-Atlas docker image for cully local operation:
44
+ ```bash
45
+ docker run -d -p 8228:8000 --name ui-atlas tinyreasonlabs/ui-atlas:latest
46
+ ```
47
+ Learn more about [UI-Atlas on Dockerhub](https://hub.docker.com/r/tinyreasonlabs/ui-atlas)
48
+
49
+ vizQA connects to the backend using the `PERCEPTION_BACKEND` environment variable:
50
+ - Default: `localhost:8228`
51
+ - Example:
52
+ ```bash
53
+ export PERCEPTION_BACKEND=localhost:8228
54
+ ```
55
+
56
+ ### Installation
57
+
58
+ ```bash
59
+ pip install vizqa
60
+ vizqa install
61
+ ```
62
+
63
+ ---
64
+
65
+ ## 📝 Usage
66
+
67
+ ### Define a Test (`login_test.yaml`)
68
+
69
+ ```yaml
70
+ name: "User Login Flow"
71
+ url: "https://example.com/login"
72
+ description: "Verify that a user can log in with valid credentials."
73
+
74
+ steps:
75
+ - action: "Type 'admin' into the username field"
76
+ expect: "The username field should contain 'admin'"
77
+ - action: "Type 'password123' into the password field"
78
+ - action: "Click the 'Login' button"
79
+ expect: "Should redirect to the dashboard and show 'Welcome back!'"
80
+ ```
81
+
82
+ ### Run the Test
83
+
84
+ ```bash
85
+ # Run all tests in a directory
86
+ vizqa tests/
87
+ ```
88
+
89
+ ### CLI Arguments
90
+
91
+ | Argument | Description | Default |
92
+ | --- | --- | --- |
93
+ | `paths` | One or more paths to test files or directories. | (Required) |
94
+ | `--headless / --no-headless` | Run browser in headless mode. | `True` |
95
+ | `-v, --verbose` | Increase output verbosity (-v, -vv). | `0` |
96
+ | `-x, --interactive` | Stop and enter interactive mode on first failure. | `False` |
97
+ | `--report` | Generate a visual HTML report after execution. | `False` |
98
+
99
+ ---
100
+
101
+ ## Configuration
102
+
103
+ vizQA supports global and per-test configuration, including custom HTTP headers for authentication or specialized testing.
104
+
105
+ ### Global Configuration
106
+ You can define global headers in your `pyproject.toml` or any common `.ini` file (e.g., `pytest.ini`, `tox.ini`).
107
+
108
+ **`pyproject.toml`**
109
+ ```toml
110
+ [tool.vizqa.headers]
111
+ Authorization = "Bearer global-api-token"
112
+ X-Custom-Header = "GlobalValue"
113
+ ```
114
+
115
+ **`pytest.ini` / `vizqa.ini`**
116
+ ```ini
117
+ [vizqa.headers]
118
+ Authorization = Bearer global-api-token
119
+ X-Custom-Header = GlobalValue
120
+ ```
121
+
122
+ ### Per-Test Overrides
123
+ You can specify or override headers directly in your test YAML file. These take precedence over global settings.
124
+
125
+ **`my_test.yaml`**
126
+ ```yaml
127
+ name: "Protected API Test"
128
+ url: "https://example.com/api"
129
+ headers:
130
+ Authorization: "Bearer test-specific-token"
131
+ steps:
132
+ - VERIFY: "Welcome" should appear
133
+ ```
134
+
135
+ ---
136
+
137
+ ## Methodology
138
+
139
+ vizQA follows a three-stage execution cycle for every step:
140
+
141
+ 1. **Perception**: Takes a screenshot and sends it to the Perception API to identify all visual elements and their properties (bounds, text, color, state).
142
+ 2. **Planning**: Uses semantic matching to understand intent and internally breaks down high-level instructions into atomic `find`, `do`, and `verify` commands to handle complex interactions.
143
+ 3. **Execution**: Performs the interaction via Playwright using precise pixel coordinates, ensuring we interact exactly with what was "seen."
144
+
145
+ ---
146
+
147
+ ## Contributing
148
+
149
+ We welcome contributions! Please see our [CONTRIBUTING.md](CONTRIBUTING.md) for details on setting up the environment and submitting PRs.
150
+
151
+ ## License
152
+
153
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
@@ -0,0 +1,53 @@
1
+
2
+ [project]
3
+ name = "vizQA"
4
+ version = "0.1.0"
5
+ description = "Vision-driven UI Testing Framework"
6
+ authors = [
7
+ {name = "Spospider", email = "64846609+Spospider@users.noreply.github.com"}
8
+ ]
9
+ readme = "README.md"
10
+ requires-python = ">=3.11"
11
+
12
+ dependencies = [
13
+ "playwright (>=1.58.0,<2.0.0)",
14
+ "click (>=8.1.7)",
15
+ "pyyaml (>=6.0.1)",
16
+ "rich (>=13.7.0)",
17
+ "httpx (>=0.27.0)",
18
+ "onnxruntime (>=1.24.3,<2.0.0)",
19
+ "tokenizers (>=0.22.2,<0.23.0)",
20
+ "pydantic (>=2.6.0)",
21
+ "tomli (>=2.0.0,<3.0.0) ; python_version < '3.11'"
22
+ ]
23
+
24
+ [project.scripts]
25
+ vizqa = "vizQA.cli:cli"
26
+
27
+ [tool.pytest.ini_options]
28
+ pythonpath = ["vizQA"]
29
+ testpaths = ["vizQA/tests"]
30
+
31
+ [build-system]
32
+ requires = ["poetry-core>=2.0.0,<3.0.0"]
33
+ build-backend = "poetry.core.masonry.api"
34
+
35
+ [tool.poetry]
36
+ packages = [
37
+ { include = "vizQA", from = "." }
38
+ ]
39
+
40
+ [dependency-groups]
41
+ dev = [
42
+ "pytest (>=9.0.2,<10.0.0)",
43
+ "coverage (>=7.13.5,<8.0.0)",
44
+ "pytest-cov (>=7.1.0,<8.0.0)",
45
+ "pytest-json-report (>=1.5.0)",
46
+ "pylint (>=4.0.4)"
47
+ ]
48
+
49
+ [tool.coverage.run]
50
+ omit = [
51
+ "tests/*",
52
+ "*/test*/*"
53
+ ]
@@ -0,0 +1,2 @@
1
+ # pylint: disable=invalid-name
2
+ # Source package initialization