qa-agent 0.2.3__tar.gz → 0.3.1__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.
- {qa_agent-0.2.3/qa_agent.egg-info → qa_agent-0.3.1}/PKG-INFO +75 -34
- {qa_agent-0.2.3 → qa_agent-0.3.1}/README.md +68 -5
- {qa_agent-0.2.3 → qa_agent-0.3.1}/pyproject.toml +10 -9
- qa_agent-0.3.1/qa_agent/__init__.py +45 -0
- {qa_agent-0.2.3 → qa_agent-0.3.1}/qa_agent/agent.py +322 -80
- {qa_agent-0.2.3 → qa_agent-0.3.1}/qa_agent/ai_planner.py +65 -0
- qa_agent-0.3.1/qa_agent/batch.py +157 -0
- {qa_agent-0.2.3 → qa_agent-0.3.1}/qa_agent/cli.py +131 -4
- qa_agent-0.3.1/qa_agent/concurrency.py +150 -0
- {qa_agent-0.2.3 → qa_agent-0.3.1}/qa_agent/config.py +40 -1
- {qa_agent-0.2.3 → qa_agent-0.3.1}/qa_agent/models.py +36 -0
- qa_agent-0.3.1/qa_agent/playwright_utils.py +60 -0
- qa_agent-0.3.1/qa_agent/rate_limiter.py +43 -0
- {qa_agent-0.2.3 → qa_agent-0.3.1}/qa_agent/reporters/json_reporter.py +1 -0
- {qa_agent-0.2.3 → qa_agent-0.3.1}/qa_agent/reporters/markdown.py +54 -1
- qa_agent-0.3.1/qa_agent/summarizer.py +165 -0
- {qa_agent-0.2.3 → qa_agent-0.3.1}/qa_agent/testers/accessibility.py +2 -1
- {qa_agent-0.2.3 → qa_agent-0.3.1}/qa_agent/testers/errors.py +3 -2
- {qa_agent-0.2.3 → qa_agent-0.3.1}/qa_agent/testers/keyboard.py +4 -2
- {qa_agent-0.2.3 → qa_agent-0.3.1}/qa_agent/testers/mouse.py +2 -1
- {qa_agent-0.2.3 → qa_agent-0.3.1}/qa_agent/web/server.py +117 -52
- {qa_agent-0.2.3 → qa_agent-0.3.1}/qa_agent/web/static/app.js +2 -0
- {qa_agent-0.2.3 → qa_agent-0.3.1}/qa_agent/web/static/index.js +37 -0
- {qa_agent-0.2.3 → qa_agent-0.3.1}/qa_agent/web/templates/index.html +27 -0
- {qa_agent-0.2.3 → qa_agent-0.3.1/qa_agent.egg-info}/PKG-INFO +75 -34
- {qa_agent-0.2.3 → qa_agent-0.3.1}/qa_agent.egg-info/SOURCES.txt +10 -16
- {qa_agent-0.2.3 → qa_agent-0.3.1}/qa_agent.egg-info/requires.txt +5 -5
- qa_agent-0.3.1/qa_agent.egg-info/top_level.txt +1 -0
- {qa_agent-0.2.3 → qa_agent-0.3.1}/tests/test_agent.py +246 -4
- {qa_agent-0.2.3 → qa_agent-0.3.1}/tests/test_ai_planner.py +89 -0
- qa_agent-0.3.1/tests/test_batch.py +121 -0
- {qa_agent-0.2.3 → qa_agent-0.3.1}/tests/test_cli.py +51 -0
- qa_agent-0.3.1/tests/test_concurrency.py +145 -0
- {qa_agent-0.2.3 → qa_agent-0.3.1}/tests/test_config.py +21 -0
- {qa_agent-0.2.3 → qa_agent-0.3.1}/tests/test_packaging.py +8 -1
- qa_agent-0.3.1/tests/test_playwright_utils.py +152 -0
- qa_agent-0.3.1/tests/test_rate_limiter.py +97 -0
- qa_agent-0.3.1/tests/test_summarizer.py +369 -0
- qa_agent-0.2.3/qa_agent/__init__.py +0 -14
- qa_agent-0.2.3/qa_agent.egg-info/top_level.txt +0 -4
- qa_agent-0.2.3/tests/__init__.py +0 -0
- qa_agent-0.2.3/tests/_cli_exit_helper.py +0 -60
- qa_agent-0.2.3/tests/conftest.py +0 -157
- qa_agent-0.2.3/tests/integration/__init__.py +0 -0
- qa_agent-0.2.3/tests/integration/test_smoke.py +0 -184
- qa_agent-0.2.3/tests/integration/test_target_coverage.py +0 -80
- qa_agent-0.2.3/tests/testers/__init__.py +0 -0
- qa_agent-0.2.3/tests/testers/test_accessibility.py +0 -187
- qa_agent-0.2.3/tests/testers/test_base.py +0 -186
- qa_agent-0.2.3/tests/testers/test_custom.py +0 -410
- qa_agent-0.2.3/tests/testers/test_errors.py +0 -526
- qa_agent-0.2.3/tests/testers/test_forms.py +0 -762
- qa_agent-0.2.3/tests/testers/test_keyboard.py +0 -365
- qa_agent-0.2.3/tests/testers/test_mouse.py +0 -552
- qa_agent-0.2.3/tests/web/__init__.py +0 -0
- qa_agent-0.2.3/tests/web/test_server.py +0 -558
- {qa_agent-0.2.3 → qa_agent-0.3.1}/LICENSE +0 -0
- {qa_agent-0.2.3 → qa_agent-0.3.1}/qa_agent/__main__.py +0 -0
- {qa_agent-0.2.3 → qa_agent-0.3.1}/qa_agent/llm_client.py +0 -0
- {qa_agent-0.2.3 → qa_agent-0.3.1}/qa_agent/plan_cache.py +0 -0
- {qa_agent-0.2.3 → qa_agent-0.3.1}/qa_agent/reporters/__init__.py +0 -0
- {qa_agent-0.2.3 → qa_agent-0.3.1}/qa_agent/reporters/base.py +0 -0
- {qa_agent-0.2.3 → qa_agent-0.3.1}/qa_agent/reporters/console.py +0 -0
- {qa_agent-0.2.3 → qa_agent-0.3.1}/qa_agent/reporters/pdf.py +0 -0
- {qa_agent-0.2.3 → qa_agent-0.3.1}/qa_agent/testers/__init__.py +0 -0
- {qa_agent-0.2.3 → qa_agent-0.3.1}/qa_agent/testers/base.py +0 -0
- {qa_agent-0.2.3 → qa_agent-0.3.1}/qa_agent/testers/custom.py +0 -0
- {qa_agent-0.2.3 → qa_agent-0.3.1}/qa_agent/testers/forms.py +0 -0
- {qa_agent-0.2.3 → qa_agent-0.3.1}/qa_agent/testers/wcag_compliance.py +0 -0
- {qa_agent-0.2.3 → qa_agent-0.3.1}/qa_agent/web/__init__.py +0 -0
- {qa_agent-0.2.3 → qa_agent-0.3.1}/qa_agent/web/static/run.js +0 -0
- {qa_agent-0.2.3 → qa_agent-0.3.1}/qa_agent/web/static/session.js +0 -0
- {qa_agent-0.2.3 → qa_agent-0.3.1}/qa_agent/web/static/sessions.js +0 -0
- {qa_agent-0.2.3 → qa_agent-0.3.1}/qa_agent/web/static/style.css +0 -0
- {qa_agent-0.2.3 → qa_agent-0.3.1}/qa_agent/web/templates/base.html +0 -0
- {qa_agent-0.2.3 → qa_agent-0.3.1}/qa_agent/web/templates/run.html +0 -0
- {qa_agent-0.2.3 → qa_agent-0.3.1}/qa_agent/web/templates/session.html +0 -0
- {qa_agent-0.2.3 → qa_agent-0.3.1}/qa_agent/web/templates/sessions.html +0 -0
- {qa_agent-0.2.3 → qa_agent-0.3.1}/qa_agent.egg-info/dependency_links.txt +0 -0
- {qa_agent-0.2.3 → qa_agent-0.3.1}/qa_agent.egg-info/entry_points.txt +0 -0
- {qa_agent-0.2.3 → qa_agent-0.3.1}/setup.cfg +0 -0
- {qa_agent-0.2.3 → qa_agent-0.3.1}/tests/test_llm_client.py +0 -0
- {qa_agent-0.2.3 → qa_agent-0.3.1}/tests/test_models.py +0 -0
- {qa_agent-0.2.3 → qa_agent-0.3.1}/tests/test_plan_cache.py +0 -0
- {qa_agent-0.2.3 → qa_agent-0.3.1}/tests/test_plan_warnings.py +0 -0
- {qa_agent-0.2.3 → qa_agent-0.3.1}/tests/test_reporters.py +0 -0
|
@@ -1,30 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: qa-agent
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary: Agentic exploratory QA testing for web applications
|
|
5
5
|
Author: Bill Richards
|
|
6
|
-
License: MIT
|
|
7
|
-
|
|
8
|
-
Copyright (c) 2026 Bill Richards
|
|
9
|
-
|
|
10
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
-
in the Software without restriction, including without limitation the rights
|
|
13
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
-
furnished to do so, subject to the following conditions:
|
|
16
|
-
|
|
17
|
-
The above copyright notice and this permission notice shall be included in all
|
|
18
|
-
copies or substantial portions of the Software.
|
|
19
|
-
|
|
20
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
-
SOFTWARE.
|
|
27
|
-
|
|
6
|
+
License-Expression: MIT
|
|
28
7
|
Project-URL: Homepage, https://github.com/billrichards/qa-agent
|
|
29
8
|
Project-URL: Repository, https://github.com/billrichards/qa-agent
|
|
30
9
|
Project-URL: Documentation, https://github.com/billrichards/qa-agent/blob/main/docs/README.md
|
|
@@ -33,7 +12,6 @@ Project-URL: Changelog, https://github.com/billrichards/qa-agent/blob/main/CHANG
|
|
|
33
12
|
Keywords: qa,testing,playwright,accessibility,agentic,automation,exploratory-testing
|
|
34
13
|
Classifier: Development Status :: 3 - Alpha
|
|
35
14
|
Classifier: Intended Audience :: Developers
|
|
36
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
37
15
|
Classifier: Programming Language :: Python :: 3
|
|
38
16
|
Classifier: Programming Language :: Python :: 3.10
|
|
39
17
|
Classifier: Programming Language :: Python :: 3.11
|
|
@@ -46,18 +24,18 @@ Description-Content-Type: text/markdown
|
|
|
46
24
|
License-File: LICENSE
|
|
47
25
|
Requires-Dist: playwright>=1.40.0
|
|
48
26
|
Provides-Extra: pdf
|
|
49
|
-
Requires-Dist: weasyprint>=
|
|
27
|
+
Requires-Dist: weasyprint>=70.0; extra == "pdf"
|
|
50
28
|
Provides-Extra: web
|
|
51
|
-
Requires-Dist: flask>=3.
|
|
52
|
-
Requires-Dist: markdown>=3.
|
|
29
|
+
Requires-Dist: flask>=3.1.3; extra == "web"
|
|
30
|
+
Requires-Dist: markdown>=3.8.1; extra == "web"
|
|
53
31
|
Requires-Dist: nh3>=0.2.15; extra == "web"
|
|
54
32
|
Provides-Extra: dev
|
|
55
|
-
Requires-Dist: pytest>=
|
|
33
|
+
Requires-Dist: pytest>=9.0.3; extra == "dev"
|
|
56
34
|
Requires-Dist: pytest-playwright>=0.4.0; extra == "dev"
|
|
57
35
|
Requires-Dist: pytest-cov>=5.0.0; extra == "dev"
|
|
58
36
|
Requires-Dist: pytest-mock>=3.10.0; extra == "dev"
|
|
59
37
|
Requires-Dist: pytest-xdist>=3.0.0; extra == "dev"
|
|
60
|
-
Requires-Dist: black>=
|
|
38
|
+
Requires-Dist: black>=26.10.1; extra == "dev"
|
|
61
39
|
Requires-Dist: ruff>=0.4.0; extra == "dev"
|
|
62
40
|
Requires-Dist: mypy>=1.0.0; extra == "dev"
|
|
63
41
|
Requires-Dist: build>=1.0.0; extra == "dev"
|
|
@@ -131,10 +109,9 @@ Need targeted tests? Pass plain-English instructions and an LLM generates custom
|
|
|
131
109
|
|
|
132
110
|
```bash
|
|
133
111
|
pip install qa-agent # standard testing (Playwright only)
|
|
134
|
-
playwright install chromium # required — downloads browser binaries
|
|
135
112
|
```
|
|
136
113
|
|
|
137
|
-
Optional extras:
|
|
114
|
+
Chromium is installed automatically on first run. Optional extras:
|
|
138
115
|
|
|
139
116
|
```bash
|
|
140
117
|
pip install "qa-agent[pdf]" # PDF reports (adds WeasyPrint)
|
|
@@ -149,7 +126,7 @@ export ANTHROPIC_API_KEY=sk-ant-... # Anthropic (default)
|
|
|
149
126
|
export OPENAI_API_KEY=sk-... # OpenAI
|
|
150
127
|
```
|
|
151
128
|
|
|
152
|
-
>
|
|
129
|
+
> Chromium is installed automatically on the first run. If you need to reinstall it manually, run `playwright install chromium`.
|
|
153
130
|
|
|
154
131
|
---
|
|
155
132
|
|
|
@@ -195,6 +172,25 @@ print(f"Pages tested: {len(session.pages_tested)}")
|
|
|
195
172
|
print(f"Total findings: {session.total_findings}")
|
|
196
173
|
```
|
|
197
174
|
|
|
175
|
+
Set `workers` to test pages in parallel, and use `BatchRunner` to run several
|
|
176
|
+
independent sessions concurrently with a bounded pool:
|
|
177
|
+
|
|
178
|
+
```python
|
|
179
|
+
from qa_agent import BatchRunner, TestConfig
|
|
180
|
+
|
|
181
|
+
configs = [
|
|
182
|
+
TestConfig(urls=["https://example.com"], workers=4),
|
|
183
|
+
TestConfig(urls=["https://other.test"]),
|
|
184
|
+
]
|
|
185
|
+
|
|
186
|
+
with BatchRunner(pool_size=4) as runner:
|
|
187
|
+
for result in runner.run_all(configs):
|
|
188
|
+
if isinstance(result, Exception):
|
|
189
|
+
print(f"session failed: {result}")
|
|
190
|
+
else:
|
|
191
|
+
print(f"{result.session_id}: {result.total_findings} findings")
|
|
192
|
+
```
|
|
193
|
+
|
|
198
194
|
→ [Full Python API Reference](https://github.com/billrichards/qa-agent/blob/main/docs/api-reference.md) — all classes, methods, and configuration options.
|
|
199
195
|
|
|
200
196
|
---
|
|
@@ -309,6 +305,50 @@ qa-agent --mode focused https://example.com # default — test only given URLs
|
|
|
309
305
|
qa-agent --mode explore https://example.com # crawl and test discovered pages
|
|
310
306
|
```
|
|
311
307
|
|
|
308
|
+
### Concurrency
|
|
309
|
+
|
|
310
|
+
Test multiple pages in parallel with cooperating workers. Each worker drives its
|
|
311
|
+
own browser, so memory and CPU scale with the worker count (capped at 16).
|
|
312
|
+
|
|
313
|
+
```bash
|
|
314
|
+
qa-agent --workers 4 --mode explore https://example.com # 4 pages at a time
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
Run several independent sessions concurrently from a JSON spec file. Each entry
|
|
318
|
+
needs `urls` plus optional per-run overrides (`mode`, `max_depth`, `max_pages`,
|
|
319
|
+
`instructions`, `workers`); all other settings come from the command-line flags.
|
|
320
|
+
|
|
321
|
+
```bash
|
|
322
|
+
qa-agent --batch-file runs.json --pool-size 4
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
```json
|
|
326
|
+
[
|
|
327
|
+
{"urls": ["https://example.com"], "mode": "explore", "workers": 4},
|
|
328
|
+
{"urls": ["https://other.test/login"], "instructions": "Check the checkout flow"}
|
|
329
|
+
]
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
| Flag | Default | Description |
|
|
333
|
+
|---|---|---|
|
|
334
|
+
| `--workers N` | `1` | Concurrent page-workers per run (max 16) |
|
|
335
|
+
| `--batch-file FILE` | — | JSON file of multiple runs to execute concurrently |
|
|
336
|
+
| `--pool-size N` | `4` | Max concurrent runs for `--batch-file` (max 8) |
|
|
337
|
+
| `--rate-limit N` | `3.0` | Max page navigations/sec to any single host (0 = unlimited) |
|
|
338
|
+
|
|
339
|
+
> Total live browsers ≈ `pool-size × workers`, so size both with that
|
|
340
|
+
> multiplicative cost in mind. The web API accepts the same `workers` value in
|
|
341
|
+
> the `POST /api/run` body, and the pool size is set server-side via the
|
|
342
|
+
> `QA_AGENT_JOB_POOL_SIZE` environment variable.
|
|
343
|
+
|
|
344
|
+
By default, navigations to any single host are throttled to 3 requests/second
|
|
345
|
+
across all workers and batch jobs, to avoid overwhelming dev/staging servers
|
|
346
|
+
with "too many connections" when running with many concurrent browsers. Raise
|
|
347
|
+
or disable this with `--rate-limit` (e.g. `--rate-limit 10` or `--rate-limit 0`
|
|
348
|
+
for unlimited). The limit applies only to page navigations (`page.goto()`), not
|
|
349
|
+
in-page interactions like clicks or form fills. The web server uses the same
|
|
350
|
+
3 req/s default, overridable via the `QA_AGENT_RATE_LIMIT` environment variable.
|
|
351
|
+
|
|
312
352
|
### Exploration (explore mode)
|
|
313
353
|
|
|
314
354
|
| Flag | Default | Description |
|
|
@@ -449,7 +489,6 @@ Six built-in suites cover keyboard navigation, mouse interaction, form handling,
|
|
|
449
489
|
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} # or OPENAI_API_KEY
|
|
450
490
|
run: |
|
|
451
491
|
pip install qa-agent
|
|
452
|
-
playwright install chromium
|
|
453
492
|
qa-agent --output json --output-dir ./qa-results https://staging.example.com
|
|
454
493
|
|
|
455
494
|
- name: Upload Results
|
|
@@ -480,11 +519,13 @@ Exits with code `1` when critical or high severity issues are found, failing the
|
|
|
480
519
|
|
|
481
520
|
### Playwright browser not found
|
|
482
521
|
|
|
522
|
+
Chromium is installed automatically on first run. If reinstalling is needed:
|
|
523
|
+
|
|
483
524
|
```bash
|
|
484
525
|
playwright install chromium
|
|
485
526
|
```
|
|
486
527
|
|
|
487
|
-
|
|
528
|
+
If automatic installation fails, run the above command manually.
|
|
488
529
|
|
|
489
530
|
### Web UI not working
|
|
490
531
|
|
|
@@ -64,10 +64,9 @@ Need targeted tests? Pass plain-English instructions and an LLM generates custom
|
|
|
64
64
|
|
|
65
65
|
```bash
|
|
66
66
|
pip install qa-agent # standard testing (Playwright only)
|
|
67
|
-
playwright install chromium # required — downloads browser binaries
|
|
68
67
|
```
|
|
69
68
|
|
|
70
|
-
Optional extras:
|
|
69
|
+
Chromium is installed automatically on first run. Optional extras:
|
|
71
70
|
|
|
72
71
|
```bash
|
|
73
72
|
pip install "qa-agent[pdf]" # PDF reports (adds WeasyPrint)
|
|
@@ -82,7 +81,7 @@ export ANTHROPIC_API_KEY=sk-ant-... # Anthropic (default)
|
|
|
82
81
|
export OPENAI_API_KEY=sk-... # OpenAI
|
|
83
82
|
```
|
|
84
83
|
|
|
85
|
-
>
|
|
84
|
+
> Chromium is installed automatically on the first run. If you need to reinstall it manually, run `playwright install chromium`.
|
|
86
85
|
|
|
87
86
|
---
|
|
88
87
|
|
|
@@ -128,6 +127,25 @@ print(f"Pages tested: {len(session.pages_tested)}")
|
|
|
128
127
|
print(f"Total findings: {session.total_findings}")
|
|
129
128
|
```
|
|
130
129
|
|
|
130
|
+
Set `workers` to test pages in parallel, and use `BatchRunner` to run several
|
|
131
|
+
independent sessions concurrently with a bounded pool:
|
|
132
|
+
|
|
133
|
+
```python
|
|
134
|
+
from qa_agent import BatchRunner, TestConfig
|
|
135
|
+
|
|
136
|
+
configs = [
|
|
137
|
+
TestConfig(urls=["https://example.com"], workers=4),
|
|
138
|
+
TestConfig(urls=["https://other.test"]),
|
|
139
|
+
]
|
|
140
|
+
|
|
141
|
+
with BatchRunner(pool_size=4) as runner:
|
|
142
|
+
for result in runner.run_all(configs):
|
|
143
|
+
if isinstance(result, Exception):
|
|
144
|
+
print(f"session failed: {result}")
|
|
145
|
+
else:
|
|
146
|
+
print(f"{result.session_id}: {result.total_findings} findings")
|
|
147
|
+
```
|
|
148
|
+
|
|
131
149
|
→ [Full Python API Reference](https://github.com/billrichards/qa-agent/blob/main/docs/api-reference.md) — all classes, methods, and configuration options.
|
|
132
150
|
|
|
133
151
|
---
|
|
@@ -242,6 +260,50 @@ qa-agent --mode focused https://example.com # default — test only given URLs
|
|
|
242
260
|
qa-agent --mode explore https://example.com # crawl and test discovered pages
|
|
243
261
|
```
|
|
244
262
|
|
|
263
|
+
### Concurrency
|
|
264
|
+
|
|
265
|
+
Test multiple pages in parallel with cooperating workers. Each worker drives its
|
|
266
|
+
own browser, so memory and CPU scale with the worker count (capped at 16).
|
|
267
|
+
|
|
268
|
+
```bash
|
|
269
|
+
qa-agent --workers 4 --mode explore https://example.com # 4 pages at a time
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
Run several independent sessions concurrently from a JSON spec file. Each entry
|
|
273
|
+
needs `urls` plus optional per-run overrides (`mode`, `max_depth`, `max_pages`,
|
|
274
|
+
`instructions`, `workers`); all other settings come from the command-line flags.
|
|
275
|
+
|
|
276
|
+
```bash
|
|
277
|
+
qa-agent --batch-file runs.json --pool-size 4
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
```json
|
|
281
|
+
[
|
|
282
|
+
{"urls": ["https://example.com"], "mode": "explore", "workers": 4},
|
|
283
|
+
{"urls": ["https://other.test/login"], "instructions": "Check the checkout flow"}
|
|
284
|
+
]
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
| Flag | Default | Description |
|
|
288
|
+
|---|---|---|
|
|
289
|
+
| `--workers N` | `1` | Concurrent page-workers per run (max 16) |
|
|
290
|
+
| `--batch-file FILE` | — | JSON file of multiple runs to execute concurrently |
|
|
291
|
+
| `--pool-size N` | `4` | Max concurrent runs for `--batch-file` (max 8) |
|
|
292
|
+
| `--rate-limit N` | `3.0` | Max page navigations/sec to any single host (0 = unlimited) |
|
|
293
|
+
|
|
294
|
+
> Total live browsers ≈ `pool-size × workers`, so size both with that
|
|
295
|
+
> multiplicative cost in mind. The web API accepts the same `workers` value in
|
|
296
|
+
> the `POST /api/run` body, and the pool size is set server-side via the
|
|
297
|
+
> `QA_AGENT_JOB_POOL_SIZE` environment variable.
|
|
298
|
+
|
|
299
|
+
By default, navigations to any single host are throttled to 3 requests/second
|
|
300
|
+
across all workers and batch jobs, to avoid overwhelming dev/staging servers
|
|
301
|
+
with "too many connections" when running with many concurrent browsers. Raise
|
|
302
|
+
or disable this with `--rate-limit` (e.g. `--rate-limit 10` or `--rate-limit 0`
|
|
303
|
+
for unlimited). The limit applies only to page navigations (`page.goto()`), not
|
|
304
|
+
in-page interactions like clicks or form fills. The web server uses the same
|
|
305
|
+
3 req/s default, overridable via the `QA_AGENT_RATE_LIMIT` environment variable.
|
|
306
|
+
|
|
245
307
|
### Exploration (explore mode)
|
|
246
308
|
|
|
247
309
|
| Flag | Default | Description |
|
|
@@ -382,7 +444,6 @@ Six built-in suites cover keyboard navigation, mouse interaction, form handling,
|
|
|
382
444
|
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} # or OPENAI_API_KEY
|
|
383
445
|
run: |
|
|
384
446
|
pip install qa-agent
|
|
385
|
-
playwright install chromium
|
|
386
447
|
qa-agent --output json --output-dir ./qa-results https://staging.example.com
|
|
387
448
|
|
|
388
449
|
- name: Upload Results
|
|
@@ -413,11 +474,13 @@ Exits with code `1` when critical or high severity issues are found, failing the
|
|
|
413
474
|
|
|
414
475
|
### Playwright browser not found
|
|
415
476
|
|
|
477
|
+
Chromium is installed automatically on first run. If reinstalling is needed:
|
|
478
|
+
|
|
416
479
|
```bash
|
|
417
480
|
playwright install chromium
|
|
418
481
|
```
|
|
419
482
|
|
|
420
|
-
|
|
483
|
+
If automatic installation fails, run the above command manually.
|
|
421
484
|
|
|
422
485
|
### Web UI not working
|
|
423
486
|
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
[build-system]
|
|
2
|
-
requires = ["setuptools>=
|
|
2
|
+
requires = ["setuptools>=84.1.0", "wheel>=0.46.2"]
|
|
3
3
|
build-backend = "setuptools.build_meta"
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "qa-agent"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.3.1"
|
|
8
8
|
description = "Agentic exploratory QA testing for web applications"
|
|
9
9
|
readme = "README.md"
|
|
10
|
-
license =
|
|
10
|
+
license = "MIT"
|
|
11
|
+
license-files = ["LICENSE"]
|
|
11
12
|
requires-python = ">=3.10"
|
|
12
13
|
authors = [{name = "Bill Richards"}]
|
|
13
14
|
keywords = ["qa", "testing", "playwright", "accessibility", "agentic", "automation", "exploratory-testing"]
|
|
14
15
|
classifiers = [
|
|
15
16
|
"Development Status :: 3 - Alpha",
|
|
16
17
|
"Intended Audience :: Developers",
|
|
17
|
-
"License :: OSI Approved :: MIT License",
|
|
18
18
|
"Programming Language :: Python :: 3",
|
|
19
19
|
"Programming Language :: Python :: 3.10",
|
|
20
20
|
"Programming Language :: Python :: 3.11",
|
|
@@ -29,20 +29,20 @@ dependencies = [
|
|
|
29
29
|
|
|
30
30
|
[project.optional-dependencies]
|
|
31
31
|
pdf = [
|
|
32
|
-
"weasyprint>=
|
|
32
|
+
"weasyprint>=70.0",
|
|
33
33
|
]
|
|
34
34
|
web = [
|
|
35
|
-
"flask>=3.
|
|
36
|
-
"markdown>=3.
|
|
35
|
+
"flask>=3.1.3",
|
|
36
|
+
"markdown>=3.8.1",
|
|
37
37
|
"nh3>=0.2.15",
|
|
38
38
|
]
|
|
39
39
|
dev = [
|
|
40
|
-
"pytest>=
|
|
40
|
+
"pytest>=9.0.3",
|
|
41
41
|
"pytest-playwright>=0.4.0",
|
|
42
42
|
"pytest-cov>=5.0.0",
|
|
43
43
|
"pytest-mock>=3.10.0",
|
|
44
44
|
"pytest-xdist>=3.0.0",
|
|
45
|
-
"black>=
|
|
45
|
+
"black>=26.10.1",
|
|
46
46
|
"ruff>=0.4.0",
|
|
47
47
|
"mypy>=1.0.0",
|
|
48
48
|
"build>=1.0.0",
|
|
@@ -64,6 +64,7 @@ Changelog = "https://github.com/billrichards/qa-agent/blob/main/CHANGELOG.md"
|
|
|
64
64
|
|
|
65
65
|
[tool.setuptools.packages.find]
|
|
66
66
|
where = ["."]
|
|
67
|
+
include = ["qa_agent*"]
|
|
67
68
|
|
|
68
69
|
[tool.setuptools.package-data]
|
|
69
70
|
"qa_agent.web" = ["templates/*.html", "static/*"]
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"""
|
|
2
|
+
QA Agent - Automated Exploratory Testing Tool
|
|
3
|
+
|
|
4
|
+
A Python/Playwright-based QA agent that performs exploratory testing on web applications,
|
|
5
|
+
testing various input methods and detecting UX issues.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from importlib.metadata import PackageNotFoundError, version
|
|
9
|
+
|
|
10
|
+
try:
|
|
11
|
+
__version__ = version("qa-agent")
|
|
12
|
+
except PackageNotFoundError:
|
|
13
|
+
# Package not installed (e.g. running from source without install)
|
|
14
|
+
__version__ = "0.3.1"
|
|
15
|
+
|
|
16
|
+
from .agent import QAAgent # noqa: E402
|
|
17
|
+
from .batch import BatchJob, BatchRunner # noqa: E402
|
|
18
|
+
from .config import ( # noqa: E402
|
|
19
|
+
AuthConfig,
|
|
20
|
+
OutputFormat,
|
|
21
|
+
RecordingConfig,
|
|
22
|
+
ScreenshotConfig,
|
|
23
|
+
TestConfig,
|
|
24
|
+
TestMode,
|
|
25
|
+
)
|
|
26
|
+
from .llm_client import LLMProvider # noqa: E402
|
|
27
|
+
from .models import Finding, PageAnalysis, Severity, TestSession # noqa: E402
|
|
28
|
+
|
|
29
|
+
__all__ = [
|
|
30
|
+
"QAAgent",
|
|
31
|
+
"BatchRunner",
|
|
32
|
+
"BatchJob",
|
|
33
|
+
"TestConfig",
|
|
34
|
+
"AuthConfig",
|
|
35
|
+
"ScreenshotConfig",
|
|
36
|
+
"RecordingConfig",
|
|
37
|
+
"TestMode",
|
|
38
|
+
"OutputFormat",
|
|
39
|
+
"LLMProvider",
|
|
40
|
+
"TestSession",
|
|
41
|
+
"PageAnalysis",
|
|
42
|
+
"Finding",
|
|
43
|
+
"Severity",
|
|
44
|
+
"__version__",
|
|
45
|
+
]
|