specterqa-ios 5.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.
- specterqa_ios-5.1.0/LICENSE +92 -0
- specterqa_ios-5.1.0/MANIFEST.in +5 -0
- specterqa_ios-5.1.0/PKG-INFO +200 -0
- specterqa_ios-5.1.0/README.md +173 -0
- specterqa_ios-5.1.0/pyproject.toml +66 -0
- specterqa_ios-5.1.0/runner/Package.swift +13 -0
- specterqa_ios-5.1.0/runner/Sources/AccessibilityTree.swift +199 -0
- specterqa_ios-5.1.0/runner/Sources/HTTPServer.swift +285 -0
- specterqa_ios-5.1.0/runner/Sources/RequestParser.swift +98 -0
- specterqa_ios-5.1.0/runner/Sources/SpecterQARunner.swift +93 -0
- specterqa_ios-5.1.0/runner/Sources/TouchInjector.swift +149 -0
- specterqa_ios-5.1.0/runner/SpecterQARunner.xcodeproj/project.pbxproj +329 -0
- specterqa_ios-5.1.0/runner/build.sh +104 -0
- specterqa_ios-5.1.0/runner/launch.sh +94 -0
- specterqa_ios-5.1.0/setup.cfg +4 -0
- specterqa_ios-5.1.0/src/specterqa/__init__.py +5 -0
- specterqa_ios-5.1.0/src/specterqa/engine/__init__.py +10 -0
- specterqa_ios-5.1.0/src/specterqa/engine/ai_step_runner.py +339 -0
- specterqa_ios-5.1.0/src/specterqa/engine/computer_use_decider.py +349 -0
- specterqa_ios-5.1.0/src/specterqa/engine/computer_use_runner.py +249 -0
- specterqa_ios-5.1.0/src/specterqa/engine/cost_tracker.py +329 -0
- specterqa_ios-5.1.0/src/specterqa/engine/models.py +31 -0
- specterqa_ios-5.1.0/src/specterqa/engine/protocols.py +87 -0
- specterqa_ios-5.1.0/src/specterqa/engine/report_generator.py +62 -0
- specterqa_ios-5.1.0/src/specterqa/engine/sim_action_executor.py +166 -0
- specterqa_ios-5.1.0/src/specterqa/engine/simulator_runner.py +542 -0
- specterqa_ios-5.1.0/src/specterqa/ios/__init__.py +37 -0
- specterqa_ios-5.1.0/src/specterqa/ios/backends/__init__.py +46 -0
- specterqa_ios-5.1.0/src/specterqa/ios/backends/cgevents.py +151 -0
- specterqa_ios-5.1.0/src/specterqa/ios/backends/indigo_hid.py +1233 -0
- specterqa_ios-5.1.0/src/specterqa/ios/backends/selector.py +218 -0
- specterqa_ios-5.1.0/src/specterqa/ios/backends/xctest_client.py +331 -0
- specterqa_ios-5.1.0/src/specterqa/ios/cli/__init__.py +12 -0
- specterqa_ios-5.1.0/src/specterqa/ios/cli/commands.py +1679 -0
- specterqa_ios-5.1.0/src/specterqa/ios/cli/setup.py +294 -0
- specterqa_ios-5.1.0/src/specterqa/ios/drivers/__init__.py +1 -0
- specterqa_ios-5.1.0/src/specterqa/ios/drivers/simulator/__init__.py +5 -0
- specterqa_ios-5.1.0/src/specterqa/ios/drivers/simulator/ai_context.py +305 -0
- specterqa_ios-5.1.0/src/specterqa/ios/drivers/simulator/capture.py +219 -0
- specterqa_ios-5.1.0/src/specterqa/ios/drivers/simulator/console.py +486 -0
- specterqa_ios-5.1.0/src/specterqa/ios/drivers/simulator/crash.py +221 -0
- specterqa_ios-5.1.0/src/specterqa/ios/drivers/simulator/driver.py +762 -0
- specterqa_ios-5.1.0/src/specterqa/ios/drivers/simulator/interaction.py +545 -0
- specterqa_ios-5.1.0/src/specterqa/ios/drivers/simulator/network.py +287 -0
- specterqa_ios-5.1.0/src/specterqa/ios/drivers/simulator/perf.py +219 -0
- specterqa_ios-5.1.0/src/specterqa/ios/drivers/simulator/state.py +341 -0
- specterqa_ios-5.1.0/src/specterqa/ios/engine/__init__.py +4 -0
- specterqa_ios-5.1.0/src/specterqa/ios/engine/ai_step_runner.py +542 -0
- specterqa_ios-5.1.0/src/specterqa/ios/engine/scenario_graph.py +238 -0
- specterqa_ios-5.1.0/src/specterqa/ios/exploratory/__init__.py +1 -0
- specterqa_ios-5.1.0/src/specterqa/ios/exploratory/agent.py +208 -0
- specterqa_ios-5.1.0/src/specterqa/ios/license/__init__.py +1 -0
- specterqa_ios-5.1.0/src/specterqa/ios/license/validator.py +217 -0
- specterqa_ios-5.1.0/src/specterqa/ios/mcp/__init__.py +1 -0
- specterqa_ios-5.1.0/src/specterqa/ios/mcp/__main__.py +9 -0
- specterqa_ios-5.1.0/src/specterqa/ios/mcp/server.py +641 -0
- specterqa_ios-5.1.0/src/specterqa/ios/parallel/__init__.py +1 -0
- specterqa_ios-5.1.0/src/specterqa/ios/parallel/idb_backend.py +119 -0
- specterqa_ios-5.1.0/src/specterqa/ios/parallel/pool.py +149 -0
- specterqa_ios-5.1.0/src/specterqa/ios/project_injector.py +275 -0
- specterqa_ios-5.1.0/src/specterqa/ios/security/__init__.py +1 -0
- specterqa_ios-5.1.0/src/specterqa/ios/security/credentials.py +236 -0
- specterqa_ios-5.1.0/src/specterqa/ios/security/redactor.py +222 -0
- specterqa_ios-5.1.0/src/specterqa/ios/session_manager.py +476 -0
- specterqa_ios-5.1.0/src/specterqa/ios/sim_driver.py +611 -0
- specterqa_ios-5.1.0/src/specterqa/ios/som_annotator.py +663 -0
- specterqa_ios-5.1.0/src/specterqa/ios/som_runner.py +822 -0
- specterqa_ios-5.1.0/src/specterqa/ios/wda_driver.py +674 -0
- specterqa_ios-5.1.0/src/specterqa/ios/webhooks/__init__.py +1 -0
- specterqa_ios-5.1.0/src/specterqa/ios/webhooks/emitter.py +113 -0
- specterqa_ios-5.1.0/src/specterqa_ios.egg-info/PKG-INFO +200 -0
- specterqa_ios-5.1.0/src/specterqa_ios.egg-info/SOURCES.txt +107 -0
- specterqa_ios-5.1.0/src/specterqa_ios.egg-info/dependency_links.txt +1 -0
- specterqa_ios-5.1.0/src/specterqa_ios.egg-info/entry_points.txt +9 -0
- specterqa_ios-5.1.0/src/specterqa_ios.egg-info/requires.txt +19 -0
- specterqa_ios-5.1.0/src/specterqa_ios.egg-info/top_level.txt +1 -0
- specterqa_ios-5.1.0/tests/test_ai_step_runner_ios.py +637 -0
- specterqa_ios-5.1.0/tests/test_backend_selector.py +349 -0
- specterqa_ios-5.1.0/tests/test_computer_use.py +814 -0
- specterqa_ios-5.1.0/tests/test_console_monitor.py +523 -0
- specterqa_ios-5.1.0/tests/test_crash_detector.py +383 -0
- specterqa_ios-5.1.0/tests/test_exploratory_agent.py +202 -0
- specterqa_ios-5.1.0/tests/test_idb_backend.py +222 -0
- specterqa_ios-5.1.0/tests/test_indigo_hid_backend.py +666 -0
- specterqa_ios-5.1.0/tests/test_interaction_layer.py +791 -0
- specterqa_ios-5.1.0/tests/test_ios_mcp_server.py +219 -0
- specterqa_ios-5.1.0/tests/test_license_validator.py +309 -0
- specterqa_ios-5.1.0/tests/test_network_inspector.py +350 -0
- specterqa_ios-5.1.0/tests/test_p0_fixes.py +100 -0
- specterqa_ios-5.1.0/tests/test_perf_profiler.py +245 -0
- specterqa_ios-5.1.0/tests/test_project_injector.py +381 -0
- specterqa_ios-5.1.0/tests/test_runner_cli.py +557 -0
- specterqa_ios-5.1.0/tests/test_runner_endpoints.py +455 -0
- specterqa_ios-5.1.0/tests/test_scenario_graph.py +518 -0
- specterqa_ios-5.1.0/tests/test_screen_capture.py +444 -0
- specterqa_ios-5.1.0/tests/test_scroll_guards.py +734 -0
- specterqa_ios-5.1.0/tests/test_security_foundation.py +527 -0
- specterqa_ios-5.1.0/tests/test_session_manager.py +555 -0
- specterqa_ios-5.1.0/tests/test_simulator_ai_context.py +467 -0
- specterqa_ios-5.1.0/tests/test_simulator_driver.py +832 -0
- specterqa_ios-5.1.0/tests/test_simulator_pool.py +370 -0
- specterqa_ios-5.1.0/tests/test_som_runner.py +803 -0
- specterqa_ios-5.1.0/tests/test_som_runner_v3.py +445 -0
- specterqa_ios-5.1.0/tests/test_state_inspector.py +288 -0
- specterqa_ios-5.1.0/tests/test_wda_driver.py +814 -0
- specterqa_ios-5.1.0/tests/test_wda_removal.py +295 -0
- specterqa_ios-5.1.0/tests/test_wda_timeout.py +239 -0
- specterqa_ios-5.1.0/tests/test_webhook_emitter.py +170 -0
- specterqa_ios-5.1.0/tests/test_xctest_backend.py +442 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
Elastic License 2.0
|
|
2
|
+
|
|
3
|
+
URL: https://www.elastic.co/licensing/elastic-license
|
|
4
|
+
|
|
5
|
+
## Acceptance
|
|
6
|
+
|
|
7
|
+
By using the software, you agree to all of the terms and conditions below.
|
|
8
|
+
|
|
9
|
+
## Copyright License
|
|
10
|
+
|
|
11
|
+
The licensor grants you a non-exclusive, royalty-free, worldwide,
|
|
12
|
+
non-sublicensable, non-transferable license to use, copy, distribute, make
|
|
13
|
+
available, and prepare derivative works of the software, in each case subject to
|
|
14
|
+
the limitations and conditions below.
|
|
15
|
+
|
|
16
|
+
## Limitations
|
|
17
|
+
|
|
18
|
+
You may not provide the software to third parties as a hosted or managed
|
|
19
|
+
service, where the service provides users with access to any substantial set of
|
|
20
|
+
the features or functionality of the software.
|
|
21
|
+
|
|
22
|
+
You may not move, change, disable, or circumvent the license key functionality
|
|
23
|
+
in the software, and you may not remove or obscure any functionality in the
|
|
24
|
+
software that is protected by the license key.
|
|
25
|
+
|
|
26
|
+
You may not alter, remove, or obscure any licensing, copyright, or other notices
|
|
27
|
+
of the licensor in the software. Any use of the licensor's trademarks is subject
|
|
28
|
+
to applicable law.
|
|
29
|
+
|
|
30
|
+
## Patents
|
|
31
|
+
|
|
32
|
+
The licensor grants you a license, under any patent claims the licensor can
|
|
33
|
+
license, or becomes able to license, to make, have made, use, sell, offer for
|
|
34
|
+
sale, import and have imported the software, in each case subject to the
|
|
35
|
+
limitations and conditions in this license. This license does not cover any
|
|
36
|
+
patent claims that you cause to be infringed by modifications or additions to the
|
|
37
|
+
software. If you or your company make any written claim that the software
|
|
38
|
+
infringes or contributes to infringement of any patent, your patent license for
|
|
39
|
+
the software granted under these terms ends immediately. If your company makes
|
|
40
|
+
such a claim, your patent license ends immediately for work on behalf of your
|
|
41
|
+
company.
|
|
42
|
+
|
|
43
|
+
## Notices
|
|
44
|
+
|
|
45
|
+
You must ensure that anyone who gets a copy of any part of the software from you
|
|
46
|
+
also gets a copy of these terms.
|
|
47
|
+
|
|
48
|
+
If you modify the software, you must include in any modified copies of the
|
|
49
|
+
software prominent notices stating that you have modified the software.
|
|
50
|
+
|
|
51
|
+
## No Other Rights
|
|
52
|
+
|
|
53
|
+
These terms do not imply any licenses other than those expressly granted in
|
|
54
|
+
these terms.
|
|
55
|
+
|
|
56
|
+
## Termination
|
|
57
|
+
|
|
58
|
+
If you use the software in violation of these terms, such use is not licensed,
|
|
59
|
+
and your licenses will automatically terminate. If the licensor provides you
|
|
60
|
+
with a notice of your violation, and you cease all violation of this license no
|
|
61
|
+
later than 30 days after you receive that notice, your licenses will be
|
|
62
|
+
reinstated retroactively. However, if you violate these terms after such
|
|
63
|
+
reinstatement, any additional violation of these terms will cause your licenses
|
|
64
|
+
to terminate automatically and permanently.
|
|
65
|
+
|
|
66
|
+
## No Liability
|
|
67
|
+
|
|
68
|
+
As far as the law allows, the software comes as is, without any warranty or
|
|
69
|
+
condition, and the licensor will not be liable to you for any damages arising
|
|
70
|
+
out of these terms or the use or nature of the software, under any kind of
|
|
71
|
+
legal claim.
|
|
72
|
+
|
|
73
|
+
## Definitions
|
|
74
|
+
|
|
75
|
+
The "licensor" is SyncTek LLC.
|
|
76
|
+
|
|
77
|
+
The "software" is the software the licensor makes available under these terms.
|
|
78
|
+
|
|
79
|
+
"You" refers to the individual or entity agreeing to these terms.
|
|
80
|
+
|
|
81
|
+
"Your company" is any legal entity, sole proprietorship, or other kind of
|
|
82
|
+
organization that you work for, plus all organizations that have control over,
|
|
83
|
+
are under the control of, or are under common control with that organization.
|
|
84
|
+
|
|
85
|
+
"Control" means ownership of substantially all the assets of an entity, or the
|
|
86
|
+
power to direct its management and policies by vote, contract, or otherwise.
|
|
87
|
+
Control can be direct or indirect.
|
|
88
|
+
|
|
89
|
+
"Your licenses" are all the licenses granted to you for the software under
|
|
90
|
+
these terms.
|
|
91
|
+
|
|
92
|
+
"Use" means anything you do with the software requiring one of your licenses.
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: specterqa-ios
|
|
3
|
+
Version: 5.1.0
|
|
4
|
+
Summary: SpecterQA iOS Simulator Driver — AI-driven iOS testing via Claude Computer Use
|
|
5
|
+
Author-email: SyncTek LLC <info@synctek.io>
|
|
6
|
+
License-Expression: Elastic-2.0
|
|
7
|
+
Requires-Python: >=3.10
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Requires-Dist: Pillow>=10.0
|
|
11
|
+
Requires-Dist: numpy>=1.24
|
|
12
|
+
Requires-Dist: anthropic>=0.39.0
|
|
13
|
+
Requires-Dist: click>=8.0
|
|
14
|
+
Requires-Dist: rich>=13.0
|
|
15
|
+
Requires-Dist: pyyaml>=6.0
|
|
16
|
+
Requires-Dist: pyobjc-framework-Quartz>=10.0
|
|
17
|
+
Provides-Extra: native
|
|
18
|
+
Requires-Dist: pyobjc-framework-Quartz>=10.0; extra == "native"
|
|
19
|
+
Provides-Extra: mcp
|
|
20
|
+
Requires-Dist: mcp>=1.0; extra == "mcp"
|
|
21
|
+
Provides-Extra: dev
|
|
22
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
23
|
+
Requires-Dist: pytest-cov>=4.0; extra == "dev"
|
|
24
|
+
Requires-Dist: mypy>=1.0; extra == "dev"
|
|
25
|
+
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
26
|
+
Dynamic: license-file
|
|
27
|
+
|
|
28
|
+
# SpecterQA iOS Simulator Driver
|
|
29
|
+
|
|
30
|
+
AI-driven iOS app testing via Claude Computer Use.
|
|
31
|
+
|
|
32
|
+
## Install
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pip install "git+https://github.com/SyncTek-LLC/specterqa-ios.git"
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
No other packages required — `specterqa-ios` is fully standalone.
|
|
39
|
+
|
|
40
|
+
## Quick Start
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# Verify environment (Xcode, simulators, API key)
|
|
44
|
+
specterqa-ios setup
|
|
45
|
+
|
|
46
|
+
# List available simulators
|
|
47
|
+
specterqa-ios devices
|
|
48
|
+
|
|
49
|
+
# Scaffold a project for your app
|
|
50
|
+
specterqa-ios init --slug my-app --name "My App"
|
|
51
|
+
|
|
52
|
+
# Edit the generated config
|
|
53
|
+
# .specterqa/products/my-app.yaml — set bundle_id and app_path
|
|
54
|
+
# .specterqa/journeys/smoke-test.yaml — customize test steps
|
|
55
|
+
|
|
56
|
+
# Validate your config before running
|
|
57
|
+
specterqa-ios validate --product my-app --journey smoke-test
|
|
58
|
+
|
|
59
|
+
# Boot a simulator
|
|
60
|
+
specterqa-ios boot
|
|
61
|
+
|
|
62
|
+
# Run a test journey
|
|
63
|
+
specterqa-ios run --product my-app --journey smoke-test
|
|
64
|
+
|
|
65
|
+
# Quick smoke test (reduced budget, fewer iterations)
|
|
66
|
+
specterqa-ios smoke --product my-app
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Commands
|
|
70
|
+
|
|
71
|
+
| Command | Description |
|
|
72
|
+
|---------|-------------|
|
|
73
|
+
| `specterqa-ios setup` | Check Xcode, simulators, and API key |
|
|
74
|
+
| `specterqa-ios devices` | List available iOS simulators |
|
|
75
|
+
| `specterqa-ios boot [--device <name>]` | Boot a simulator |
|
|
76
|
+
| `specterqa-ios install <app.app> [--device <id>]` | Install app on simulator |
|
|
77
|
+
| `specterqa-ios init [--slug <id>]` | Scaffold project config files |
|
|
78
|
+
| `specterqa-ios validate --product <slug>` | Validate product/journey config |
|
|
79
|
+
| `specterqa-ios run --product <slug> --journey <id>` | Run a test journey |
|
|
80
|
+
| `specterqa-ios smoke --product <slug>` | Quick smoke test |
|
|
81
|
+
| `specterqa-ios serve` | Start the MCP server (stdio transport) |
|
|
82
|
+
|
|
83
|
+
## Claude Code Integration
|
|
84
|
+
|
|
85
|
+
SpecterQA iOS ships as a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server,
|
|
86
|
+
letting Claude Code drive iOS simulator tests directly from your editor.
|
|
87
|
+
|
|
88
|
+
### Install with MCP extras
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
pip install 'specterqa-ios[mcp]'
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Add to Claude Code
|
|
95
|
+
|
|
96
|
+
Add the server to your Claude Code MCP configuration. The `specterqa-ios-mcp` console script
|
|
97
|
+
is registered by `pip install` and starts the stdio server automatically.
|
|
98
|
+
|
|
99
|
+
**Option A — project-level** (`.claude/mcp.json` in your repo root):
|
|
100
|
+
|
|
101
|
+
```json
|
|
102
|
+
{
|
|
103
|
+
"mcpServers": {
|
|
104
|
+
"specterqa-ios": {
|
|
105
|
+
"command": "specterqa-ios-mcp",
|
|
106
|
+
"env": {
|
|
107
|
+
"SPECTERQA_IOS_LICENSE": "founder"
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**Option B — global** (add to `~/.claude/mcp.json` or via `claude mcp add`):
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
claude mcp add specterqa-ios -- specterqa-ios-mcp
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Set `ANTHROPIC_API_KEY` in the environment (or in the `env` block above).
|
|
121
|
+
|
|
122
|
+
### Available MCP Tools
|
|
123
|
+
|
|
124
|
+
Once connected, Claude Code can call these tools:
|
|
125
|
+
|
|
126
|
+
| Tool | Description |
|
|
127
|
+
|------|-------------|
|
|
128
|
+
| `ios_setup` | Check environment (Xcode, simulators, API key) |
|
|
129
|
+
| `ios_list_devices` | List available iOS simulators |
|
|
130
|
+
| `ios_boot_device` | Boot a simulator by name or UDID |
|
|
131
|
+
| `ios_install_app` | Install a .app bundle on a simulator |
|
|
132
|
+
| `ios_run_test` | Run a full test journey (primary tool) |
|
|
133
|
+
| `ios_run_smoke` | Quick smoke test (reduced budget) |
|
|
134
|
+
| `ios_run_exploratory` | Persona-driven AI exploration |
|
|
135
|
+
| `ios_get_results` | Retrieve results from a previous run |
|
|
136
|
+
| `ios_screenshot` | Screenshot the current simulator state |
|
|
137
|
+
| `ios_list_products` | List configured products |
|
|
138
|
+
| `ios_list_journeys` | List configured journeys |
|
|
139
|
+
|
|
140
|
+
### Example Claude Code session
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
> Run a smoke test on the Palace iOS app
|
|
144
|
+
|
|
145
|
+
[Claude calls ios_list_products, discovers palace-ios]
|
|
146
|
+
[Claude calls ios_boot_device, boots iPhone 15 Pro]
|
|
147
|
+
[Claude calls ios_run_smoke with product_slug="palace-ios"]
|
|
148
|
+
[Returns: 4/4 steps passed, 0 findings, $0.32 spent]
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Alternative: direct invocation
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
# stdio transport (for custom MCP clients)
|
|
155
|
+
specterqa-ios-mcp
|
|
156
|
+
|
|
157
|
+
# or via Python module
|
|
158
|
+
python -m specterqa.ios.mcp
|
|
159
|
+
|
|
160
|
+
# or via CLI
|
|
161
|
+
specterqa-ios serve
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## Requirements
|
|
165
|
+
|
|
166
|
+
- macOS with Xcode 15+
|
|
167
|
+
- Python 3.10+
|
|
168
|
+
- `ANTHROPIC_API_KEY` environment variable
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
export ANTHROPIC_API_KEY=sk-ant-...
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
## Project Structure
|
|
175
|
+
|
|
176
|
+
After `specterqa-ios init`, your project contains:
|
|
177
|
+
|
|
178
|
+
```
|
|
179
|
+
.specterqa/
|
|
180
|
+
products/
|
|
181
|
+
my-app.yaml # bundle_id, device, cost limits
|
|
182
|
+
personas/
|
|
183
|
+
ios-tester.yaml # AI persona (goals, frustrations, credentials)
|
|
184
|
+
journeys/
|
|
185
|
+
smoke-test.yaml # test steps with goals and checkpoints
|
|
186
|
+
evidence/
|
|
187
|
+
IOS-RUN-*/ # screenshots, step results, run-result.json
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
## How It Works
|
|
191
|
+
|
|
192
|
+
1. Each journey step has a `goal` — a natural-language instruction for Claude
|
|
193
|
+
2. The AI takes a screenshot of the simulator, observes the UI context, and decides the next action (tap, type, scroll, wait)
|
|
194
|
+
3. Actions are executed via `xcrun simctl` and Quartz event injection
|
|
195
|
+
4. Crashes, error logs, and performance anomalies are surfaced as Findings
|
|
196
|
+
5. All evidence (screenshots, step summaries, findings) is saved to `.specterqa/evidence/`
|
|
197
|
+
|
|
198
|
+
## License
|
|
199
|
+
|
|
200
|
+
Elastic License 2.0 — see [LICENSE](LICENSE).
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
# SpecterQA iOS Simulator Driver
|
|
2
|
+
|
|
3
|
+
AI-driven iOS app testing via Claude Computer Use.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install "git+https://github.com/SyncTek-LLC/specterqa-ios.git"
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
No other packages required — `specterqa-ios` is fully standalone.
|
|
12
|
+
|
|
13
|
+
## Quick Start
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# Verify environment (Xcode, simulators, API key)
|
|
17
|
+
specterqa-ios setup
|
|
18
|
+
|
|
19
|
+
# List available simulators
|
|
20
|
+
specterqa-ios devices
|
|
21
|
+
|
|
22
|
+
# Scaffold a project for your app
|
|
23
|
+
specterqa-ios init --slug my-app --name "My App"
|
|
24
|
+
|
|
25
|
+
# Edit the generated config
|
|
26
|
+
# .specterqa/products/my-app.yaml — set bundle_id and app_path
|
|
27
|
+
# .specterqa/journeys/smoke-test.yaml — customize test steps
|
|
28
|
+
|
|
29
|
+
# Validate your config before running
|
|
30
|
+
specterqa-ios validate --product my-app --journey smoke-test
|
|
31
|
+
|
|
32
|
+
# Boot a simulator
|
|
33
|
+
specterqa-ios boot
|
|
34
|
+
|
|
35
|
+
# Run a test journey
|
|
36
|
+
specterqa-ios run --product my-app --journey smoke-test
|
|
37
|
+
|
|
38
|
+
# Quick smoke test (reduced budget, fewer iterations)
|
|
39
|
+
specterqa-ios smoke --product my-app
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Commands
|
|
43
|
+
|
|
44
|
+
| Command | Description |
|
|
45
|
+
|---------|-------------|
|
|
46
|
+
| `specterqa-ios setup` | Check Xcode, simulators, and API key |
|
|
47
|
+
| `specterqa-ios devices` | List available iOS simulators |
|
|
48
|
+
| `specterqa-ios boot [--device <name>]` | Boot a simulator |
|
|
49
|
+
| `specterqa-ios install <app.app> [--device <id>]` | Install app on simulator |
|
|
50
|
+
| `specterqa-ios init [--slug <id>]` | Scaffold project config files |
|
|
51
|
+
| `specterqa-ios validate --product <slug>` | Validate product/journey config |
|
|
52
|
+
| `specterqa-ios run --product <slug> --journey <id>` | Run a test journey |
|
|
53
|
+
| `specterqa-ios smoke --product <slug>` | Quick smoke test |
|
|
54
|
+
| `specterqa-ios serve` | Start the MCP server (stdio transport) |
|
|
55
|
+
|
|
56
|
+
## Claude Code Integration
|
|
57
|
+
|
|
58
|
+
SpecterQA iOS ships as a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server,
|
|
59
|
+
letting Claude Code drive iOS simulator tests directly from your editor.
|
|
60
|
+
|
|
61
|
+
### Install with MCP extras
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
pip install 'specterqa-ios[mcp]'
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Add to Claude Code
|
|
68
|
+
|
|
69
|
+
Add the server to your Claude Code MCP configuration. The `specterqa-ios-mcp` console script
|
|
70
|
+
is registered by `pip install` and starts the stdio server automatically.
|
|
71
|
+
|
|
72
|
+
**Option A — project-level** (`.claude/mcp.json` in your repo root):
|
|
73
|
+
|
|
74
|
+
```json
|
|
75
|
+
{
|
|
76
|
+
"mcpServers": {
|
|
77
|
+
"specterqa-ios": {
|
|
78
|
+
"command": "specterqa-ios-mcp",
|
|
79
|
+
"env": {
|
|
80
|
+
"SPECTERQA_IOS_LICENSE": "founder"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**Option B — global** (add to `~/.claude/mcp.json` or via `claude mcp add`):
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
claude mcp add specterqa-ios -- specterqa-ios-mcp
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Set `ANTHROPIC_API_KEY` in the environment (or in the `env` block above).
|
|
94
|
+
|
|
95
|
+
### Available MCP Tools
|
|
96
|
+
|
|
97
|
+
Once connected, Claude Code can call these tools:
|
|
98
|
+
|
|
99
|
+
| Tool | Description |
|
|
100
|
+
|------|-------------|
|
|
101
|
+
| `ios_setup` | Check environment (Xcode, simulators, API key) |
|
|
102
|
+
| `ios_list_devices` | List available iOS simulators |
|
|
103
|
+
| `ios_boot_device` | Boot a simulator by name or UDID |
|
|
104
|
+
| `ios_install_app` | Install a .app bundle on a simulator |
|
|
105
|
+
| `ios_run_test` | Run a full test journey (primary tool) |
|
|
106
|
+
| `ios_run_smoke` | Quick smoke test (reduced budget) |
|
|
107
|
+
| `ios_run_exploratory` | Persona-driven AI exploration |
|
|
108
|
+
| `ios_get_results` | Retrieve results from a previous run |
|
|
109
|
+
| `ios_screenshot` | Screenshot the current simulator state |
|
|
110
|
+
| `ios_list_products` | List configured products |
|
|
111
|
+
| `ios_list_journeys` | List configured journeys |
|
|
112
|
+
|
|
113
|
+
### Example Claude Code session
|
|
114
|
+
|
|
115
|
+
```
|
|
116
|
+
> Run a smoke test on the Palace iOS app
|
|
117
|
+
|
|
118
|
+
[Claude calls ios_list_products, discovers palace-ios]
|
|
119
|
+
[Claude calls ios_boot_device, boots iPhone 15 Pro]
|
|
120
|
+
[Claude calls ios_run_smoke with product_slug="palace-ios"]
|
|
121
|
+
[Returns: 4/4 steps passed, 0 findings, $0.32 spent]
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Alternative: direct invocation
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
# stdio transport (for custom MCP clients)
|
|
128
|
+
specterqa-ios-mcp
|
|
129
|
+
|
|
130
|
+
# or via Python module
|
|
131
|
+
python -m specterqa.ios.mcp
|
|
132
|
+
|
|
133
|
+
# or via CLI
|
|
134
|
+
specterqa-ios serve
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## Requirements
|
|
138
|
+
|
|
139
|
+
- macOS with Xcode 15+
|
|
140
|
+
- Python 3.10+
|
|
141
|
+
- `ANTHROPIC_API_KEY` environment variable
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
export ANTHROPIC_API_KEY=sk-ant-...
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## Project Structure
|
|
148
|
+
|
|
149
|
+
After `specterqa-ios init`, your project contains:
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
.specterqa/
|
|
153
|
+
products/
|
|
154
|
+
my-app.yaml # bundle_id, device, cost limits
|
|
155
|
+
personas/
|
|
156
|
+
ios-tester.yaml # AI persona (goals, frustrations, credentials)
|
|
157
|
+
journeys/
|
|
158
|
+
smoke-test.yaml # test steps with goals and checkpoints
|
|
159
|
+
evidence/
|
|
160
|
+
IOS-RUN-*/ # screenshots, step results, run-result.json
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## How It Works
|
|
164
|
+
|
|
165
|
+
1. Each journey step has a `goal` — a natural-language instruction for Claude
|
|
166
|
+
2. The AI takes a screenshot of the simulator, observes the UI context, and decides the next action (tap, type, scroll, wait)
|
|
167
|
+
3. Actions are executed via `xcrun simctl` and Quartz event injection
|
|
168
|
+
4. Crashes, error logs, and performance anomalies are surfaced as Findings
|
|
169
|
+
5. All evidence (screenshots, step summaries, findings) is saved to `.specterqa/evidence/`
|
|
170
|
+
|
|
171
|
+
## License
|
|
172
|
+
|
|
173
|
+
Elastic License 2.0 — see [LICENSE](LICENSE).
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "specterqa-ios"
|
|
7
|
+
version = "5.1.0"
|
|
8
|
+
description = "SpecterQA iOS Simulator Driver — AI-driven iOS testing via Claude Computer Use"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "Elastic-2.0"
|
|
11
|
+
requires-python = ">=3.10"
|
|
12
|
+
authors = [
|
|
13
|
+
{name = "SyncTek LLC", email = "info@synctek.io"},
|
|
14
|
+
]
|
|
15
|
+
|
|
16
|
+
dependencies = [
|
|
17
|
+
"Pillow>=10.0",
|
|
18
|
+
"numpy>=1.24",
|
|
19
|
+
"anthropic>=0.39.0",
|
|
20
|
+
"click>=8.0",
|
|
21
|
+
"rich>=13.0",
|
|
22
|
+
"pyyaml>=6.0",
|
|
23
|
+
"pyobjc-framework-Quartz>=10.0",
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
[project.optional-dependencies]
|
|
27
|
+
native = [
|
|
28
|
+
"pyobjc-framework-Quartz>=10.0",
|
|
29
|
+
]
|
|
30
|
+
mcp = [
|
|
31
|
+
"mcp>=1.0",
|
|
32
|
+
]
|
|
33
|
+
dev = [
|
|
34
|
+
"pytest>=7.0",
|
|
35
|
+
"pytest-cov>=4.0",
|
|
36
|
+
"mypy>=1.0",
|
|
37
|
+
"ruff>=0.1.0",
|
|
38
|
+
]
|
|
39
|
+
|
|
40
|
+
[project.scripts]
|
|
41
|
+
specterqa-ios = "specterqa.ios.cli.commands:main"
|
|
42
|
+
specterqa-ios-mcp = "specterqa.ios.mcp.server:serve"
|
|
43
|
+
|
|
44
|
+
[project.entry-points."specterqa.drivers"]
|
|
45
|
+
ios_simulator = "specterqa.ios.sim_driver:SimDriver"
|
|
46
|
+
|
|
47
|
+
[project.entry-points."specterqa.cli_extensions"]
|
|
48
|
+
ios = "specterqa.ios.cli:ios_command_group"
|
|
49
|
+
|
|
50
|
+
[tool.setuptools]
|
|
51
|
+
include-package-data = true
|
|
52
|
+
|
|
53
|
+
[tool.setuptools.packages.find]
|
|
54
|
+
where = ["src"]
|
|
55
|
+
include = ["specterqa*"]
|
|
56
|
+
|
|
57
|
+
[tool.pytest.ini_options]
|
|
58
|
+
testpaths = ["tests"]
|
|
59
|
+
pythonpath = ["src"]
|
|
60
|
+
markers = [
|
|
61
|
+
"integration: real-device integration tests (require a booted iOS Simulator)",
|
|
62
|
+
]
|
|
63
|
+
|
|
64
|
+
[tool.ruff]
|
|
65
|
+
line-length = 120
|
|
66
|
+
target-version = "py310"
|