fusiontest 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.
Files changed (35) hide show
  1. fusiontest-0.1.0/PKG-INFO +260 -0
  2. fusiontest-0.1.0/README.md +192 -0
  3. fusiontest-0.1.0/fusiontest/__init__.py +2 -0
  4. fusiontest-0.1.0/fusiontest/cli.py +477 -0
  5. fusiontest-0.1.0/fusiontest/core/__init__.py +0 -0
  6. fusiontest-0.1.0/fusiontest/core/action_model.py +382 -0
  7. fusiontest-0.1.0/fusiontest/core/goal_verifier.py +291 -0
  8. fusiontest-0.1.0/fusiontest/core/runner.py +310 -0
  9. fusiontest-0.1.0/fusiontest/core/screen_parser.py +283 -0
  10. fusiontest-0.1.0/fusiontest/desktop/__init__.py +0 -0
  11. fusiontest-0.1.0/fusiontest/desktop/macos_adapter.py +450 -0
  12. fusiontest-0.1.0/fusiontest/desktop/playwright_adapter.py +454 -0
  13. fusiontest-0.1.0/fusiontest/desktop/windows_adapter.py +423 -0
  14. fusiontest-0.1.0/fusiontest/guardrails/__init__.py +0 -0
  15. fusiontest-0.1.0/fusiontest/guardrails/engine.py +247 -0
  16. fusiontest-0.1.0/fusiontest/mobile/__init__.py +0 -0
  17. fusiontest-0.1.0/fusiontest/mobile/android_adapter.py +201 -0
  18. fusiontest-0.1.0/fusiontest/mobile/ios_adapter.py +266 -0
  19. fusiontest-0.1.0/fusiontest/recording/__init__.py +19 -0
  20. fusiontest-0.1.0/fusiontest/recording/recorder.py +309 -0
  21. fusiontest-0.1.0/fusiontest/reporting/__init__.py +0 -0
  22. fusiontest-0.1.0/fusiontest/reporting/reporter.py +201 -0
  23. fusiontest-0.1.0/fusiontest/training/__init__.py +35 -0
  24. fusiontest-0.1.0/fusiontest/training/data_collector.py +241 -0
  25. fusiontest-0.1.0/fusiontest/training/dataset_builder.py +210 -0
  26. fusiontest-0.1.0/fusiontest/training/trainer.py +336 -0
  27. fusiontest-0.1.0/fusiontest.egg-info/PKG-INFO +260 -0
  28. fusiontest-0.1.0/fusiontest.egg-info/SOURCES.txt +33 -0
  29. fusiontest-0.1.0/fusiontest.egg-info/dependency_links.txt +1 -0
  30. fusiontest-0.1.0/fusiontest.egg-info/entry_points.txt +4 -0
  31. fusiontest-0.1.0/fusiontest.egg-info/not-zip-safe +1 -0
  32. fusiontest-0.1.0/fusiontest.egg-info/requires.txt +58 -0
  33. fusiontest-0.1.0/fusiontest.egg-info/top_level.txt +1 -0
  34. fusiontest-0.1.0/pyproject.toml +121 -0
  35. fusiontest-0.1.0/setup.cfg +4 -0
@@ -0,0 +1,260 @@
1
+ Metadata-Version: 2.4
2
+ Name: fusiontest
3
+ Version: 0.1.0
4
+ Summary: AI-powered UI testing for mobile and desktop โ€” by FusionLeap.io
5
+ Author-email: FusionLeap <hello@fusionleap.io>
6
+ License: MIT
7
+ Project-URL: Homepage, https://fusionleap.io
8
+ Project-URL: Repository, https://github.com/mohigo/fusion-test
9
+ Project-URL: Issues, https://github.com/mohigo/fusion-test/issues
10
+ Keywords: testing,AI,mobile,desktop,LLM,automation,QA
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Topic :: Software Development :: Testing
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Requires-Python: >=3.10
19
+ Description-Content-Type: text/markdown
20
+ Requires-Dist: click>=8.1
21
+ Requires-Dist: pyyaml>=6.0
22
+ Requires-Dist: httpx>=0.27
23
+ Requires-Dist: python-dotenv>=1.0
24
+ Requires-Dist: rich>=13.0
25
+ Requires-Dist: pydantic>=2.0
26
+ Provides-Extra: mobile
27
+ Requires-Dist: Appium-Python-Client>=3.1; extra == "mobile"
28
+ Requires-Dist: selenium>=4.18; extra == "mobile"
29
+ Provides-Extra: desktop
30
+ Requires-Dist: playwright>=1.43; extra == "desktop"
31
+ Provides-Extra: windows
32
+ Requires-Dist: Appium-Python-Client>=3.1; extra == "windows"
33
+ Requires-Dist: selenium>=4.18; extra == "windows"
34
+ Provides-Extra: mpnet
35
+ Requires-Dist: sentence-transformers>=2.7; extra == "mpnet"
36
+ Requires-Dist: torch>=2.2; extra == "mpnet"
37
+ Provides-Extra: api
38
+ Requires-Dist: fastapi>=0.111; extra == "api"
39
+ Requires-Dist: uvicorn[standard]>=0.29; extra == "api"
40
+ Requires-Dist: pydantic[email]>=2.0; extra == "api"
41
+ Requires-Dist: python-jose[cryptography]>=3.3; extra == "api"
42
+ Requires-Dist: passlib[bcrypt]>=1.7; extra == "api"
43
+ Requires-Dist: psycopg2-binary>=2.9; extra == "api"
44
+ Provides-Extra: training
45
+ Requires-Dist: sentence-transformers>=2.7; extra == "training"
46
+ Requires-Dist: torch>=2.2; extra == "training"
47
+ Requires-Dist: datasets>=2.19; extra == "training"
48
+ Requires-Dist: accelerate>=0.30; extra == "training"
49
+ Requires-Dist: scikit-learn>=1.4; extra == "training"
50
+ Requires-Dist: pandas>=2.2; extra == "training"
51
+ Requires-Dist: numpy>=1.26; extra == "training"
52
+ Requires-Dist: tqdm>=4.66; extra == "training"
53
+ Requires-Dist: wandb>=0.17; extra == "training"
54
+ Provides-Extra: openai
55
+ Requires-Dist: openai>=1.25; extra == "openai"
56
+ Provides-Extra: claude
57
+ Requires-Dist: anthropic>=0.25; extra == "claude"
58
+ Provides-Extra: dev
59
+ Requires-Dist: pytest>=8.0; extra == "dev"
60
+ Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
61
+ Requires-Dist: pytest-cov>=5.0; extra == "dev"
62
+ Requires-Dist: ruff>=0.4; extra == "dev"
63
+ Requires-Dist: mypy>=1.10; extra == "dev"
64
+ Requires-Dist: pre-commit>=3.7; extra == "dev"
65
+ Requires-Dist: fusiontest[desktop,mobile,openai]; extra == "dev"
66
+ Provides-Extra: all
67
+ Requires-Dist: fusiontest[api,claude,desktop,mobile,mpnet,openai,training,windows]; extra == "all"
68
+
69
+ # ๐Ÿงช FusionTest
70
+
71
+ > AI-powered UI testing for mobile and desktop โ€” built by [FusionLeap.io](https://fusionleap.io)
72
+
73
+ FusionTest uses large language models to execute UI tests the way a human would โ€” reading screens, making decisions, and adapting to UI changes automatically. No brittle scripts. No maintenance overhead. Just natural language test goals that run anywhere.
74
+
75
+ ---
76
+
77
+ ## โœจ Features
78
+
79
+ | Feature | Mobile (iOS/Android) | Desktop (Win/Mac/Linux) |
80
+ |---|---|---|
81
+ | Natural language test goals | โœ… | โœ… |
82
+ | Zero-maintenance execution | โœ… | โœ… |
83
+ | Multi-locale / 50+ languages | โœ… | โœ… |
84
+ | Hallucination guardrails | โœ… | โœ… |
85
+ | Loop detection & backtrack | โœ… | โœ… |
86
+ | CI/CD integration | โœ… | โœ… |
87
+ | Vision model fallback | โ€” | โœ… |
88
+ | Cross-app flow testing | โ€” | โœ… |
89
+ | Electron / Playwright support | โ€” | โœ… |
90
+
91
+ ---
92
+
93
+ ## ๐Ÿ— Architecture
94
+
95
+ ```
96
+ fusiontest/
97
+ โ”œโ”€โ”€ core/ # LLM action model, embeddings, screen parser
98
+ โ”œโ”€โ”€ mobile/ # iOS (XCTest) + Android (UIAutomator2) adapters
99
+ โ”œโ”€โ”€ desktop/ # Windows (WinAppDriver), macOS (Accessibility API), Playwright
100
+ โ”œโ”€โ”€ guardrails/ # Hallucination handler, loop detector, backtrack engine
101
+ โ””โ”€โ”€ reporting/ # Dashboard data, Slack/email alerts, CI artifacts
102
+ ```
103
+
104
+ ---
105
+
106
+ ## ๐Ÿš€ Quickstart
107
+
108
+ ### Prerequisites
109
+ - Python 3.10+
110
+ - Node.js 18+ (for Playwright/Electron targets)
111
+ - Appium 2.x (for mobile)
112
+
113
+ ### Install
114
+
115
+ ```bash
116
+ git clone https://github.com/mohigo/fusion-test.git
117
+ cd fusion-test
118
+ pip install -e ".[dev]"
119
+ ```
120
+
121
+ ### Set your API key
122
+
123
+ ```bash
124
+ export FUSIONTEST_API_KEY=your_key_here
125
+ # or copy .env.example โ†’ .env and fill in values
126
+ ```
127
+
128
+ ### Run your first test
129
+
130
+ ```bash
131
+ fusiontest run --goal "Log in, navigate to settings, update profile name" \
132
+ --platform android \
133
+ --app path/to/app.apk \
134
+ --locale en-US
135
+ ```
136
+
137
+ > **Full guide:** [docs/getting-started.md](docs/getting-started.md) โ€” covers all platforms (web, Android, iOS, Electron, Windows, macOS), Python API usage, configuration, dashboard, CI setup, and tips for writing good goals.
138
+
139
+ ---
140
+
141
+ ## ๐Ÿ“ Writing Test Goals
142
+
143
+ FusionTest accepts natural language goals. No code required.
144
+
145
+ ```yaml
146
+ # tests/goals/onboarding.yaml
147
+ name: User onboarding flow
148
+ platform: android
149
+ locale: en-US
150
+ goals:
151
+ - "Open the app and tap Get Started"
152
+ - "Enter email address and password on the signup screen"
153
+ - "Verify the home dashboard loads with a welcome message"
154
+ ```
155
+
156
+ Run it:
157
+
158
+ ```bash
159
+ fusiontest run --file tests/goals/onboarding.yaml
160
+ ```
161
+
162
+ ---
163
+
164
+ ## ๐Ÿ”Œ CI/CD Integration
165
+
166
+ ### GitHub Actions
167
+
168
+ ```yaml
169
+ - name: Run FusionTest
170
+ uses: fusionleap/fusiontest-action@v1
171
+ with:
172
+ goal-file: tests/goals/smoke.yaml
173
+ platform: android
174
+ api-key: ${{ secrets.FUSIONTEST_API_KEY }}
175
+ ```
176
+
177
+ ### Bitrise / Fastlane
178
+
179
+ See [docs/ci-integrations.md](docs/ci-integrations.md) for step-by-step guides.
180
+
181
+ ---
182
+
183
+ ## ๐Ÿ“Š Reporting
184
+
185
+ Every test run produces:
186
+ - Pass/fail summary with stability score
187
+ - Screen-by-screen action log
188
+ - Video recording of the test session
189
+ - Bug report with screenshot + repro steps (on failure)
190
+
191
+ Results are posted to your FusionTest dashboard and optionally to Slack.
192
+
193
+ ---
194
+
195
+ ## ๐Ÿ›  Configuration
196
+
197
+ ```yaml
198
+ # fusiontest.config.yaml
199
+ model:
200
+ backbone: mpnet-base # or: gpt-4o, claude-sonnet (for MVP/fallback)
201
+ precision_threshold: 0.97
202
+ max_retries: 3
203
+
204
+ guardrails:
205
+ loop_detection: true
206
+ loop_window: 5 # check last N screen states
207
+ backtrack_on_invalid: true
208
+ max_backtracks: 2
209
+
210
+ devices:
211
+ android:
212
+ farm: browserstack # or: aws-device-farm, local
213
+ desktop:
214
+ vision_fallback: true # enable for non-accessible UIs
215
+ playwright_for_electron: true
216
+
217
+ reporting:
218
+ slack_webhook: ${SLACK_WEBHOOK}
219
+ save_recordings: true
220
+ dashboard_url: https://app.fusionleap.io
221
+ ```
222
+
223
+ ---
224
+
225
+ ## ๐Ÿ—บ Roadmap
226
+
227
+ - [x] Core LLM action model (MPNet / GPT-4o / Claude backends)
228
+ - [x] Android adapter (UIAutomator2 + Appium)
229
+ - [x] iOS adapter (XCUITest + Appium)
230
+ - [x] Desktop adapter โ€” Playwright / Electron (with vision fallback)
231
+ - [x] Desktop adapter โ€” Windows (WinAppDriver / UIA)
232
+ - [x] Desktop adapter โ€” macOS (NSAccessibility + PyObjC)
233
+ - [x] Guardrails engine (invalid actions, loops, backtrack)
234
+ - [x] Goal completion verifier (LLM + heuristic fallback)
235
+ - [x] Video recording โ€” Playwright WebMโ†’MP4, Appium, Windows screenshot stitch
236
+ - [x] Reporting โ€” JSON, Slack webhooks, GitHub Actions annotations
237
+ - [x] CLI โ€” `fusiontest run / init / demo / report`
238
+ - [x] MPNet fine-tuning pipeline (`fusiontest/training/`)
239
+ - [x] FusionLeap cloud dashboard (React + Recharts + SaaS pages)
240
+ - [x] Dashboard backend API (FastAPI + PostgreSQL/Supabase)
241
+ - [x] SaaS backend โ€” auth, org management, API keys, webhooks, billing
242
+ - [x] Marketing website (Next.js, `website/`)
243
+ - [x] Integration tests โ€” runner, guardrails, goal verifier
244
+ - [x] CI/CD integration guides (`docs/ci-integrations.md`)
245
+ - [ ] Autonomous Test Discovery โ€” auto-crawl website โ†’ generate goals โ†’ execute
246
+ - [ ] RAG test library (few-shot goal โ†’ flow)
247
+ - [ ] Multi-locale parallel execution
248
+ - [ ] Cross-app flow testing (desktop)
249
+
250
+ ---
251
+
252
+ ## ๐Ÿค Contributing
253
+
254
+ See [CONTRIBUTING.md](CONTRIBUTING.md). We welcome issues, PRs, and test goal examples from the community.
255
+
256
+ ---
257
+
258
+ ## ๐Ÿ“„ License
259
+
260
+ MIT ยฉ [FusionLeap.io](https://fusionleap.io)
@@ -0,0 +1,192 @@
1
+ # ๐Ÿงช FusionTest
2
+
3
+ > AI-powered UI testing for mobile and desktop โ€” built by [FusionLeap.io](https://fusionleap.io)
4
+
5
+ FusionTest uses large language models to execute UI tests the way a human would โ€” reading screens, making decisions, and adapting to UI changes automatically. No brittle scripts. No maintenance overhead. Just natural language test goals that run anywhere.
6
+
7
+ ---
8
+
9
+ ## โœจ Features
10
+
11
+ | Feature | Mobile (iOS/Android) | Desktop (Win/Mac/Linux) |
12
+ |---|---|---|
13
+ | Natural language test goals | โœ… | โœ… |
14
+ | Zero-maintenance execution | โœ… | โœ… |
15
+ | Multi-locale / 50+ languages | โœ… | โœ… |
16
+ | Hallucination guardrails | โœ… | โœ… |
17
+ | Loop detection & backtrack | โœ… | โœ… |
18
+ | CI/CD integration | โœ… | โœ… |
19
+ | Vision model fallback | โ€” | โœ… |
20
+ | Cross-app flow testing | โ€” | โœ… |
21
+ | Electron / Playwright support | โ€” | โœ… |
22
+
23
+ ---
24
+
25
+ ## ๐Ÿ— Architecture
26
+
27
+ ```
28
+ fusiontest/
29
+ โ”œโ”€โ”€ core/ # LLM action model, embeddings, screen parser
30
+ โ”œโ”€โ”€ mobile/ # iOS (XCTest) + Android (UIAutomator2) adapters
31
+ โ”œโ”€โ”€ desktop/ # Windows (WinAppDriver), macOS (Accessibility API), Playwright
32
+ โ”œโ”€โ”€ guardrails/ # Hallucination handler, loop detector, backtrack engine
33
+ โ””โ”€โ”€ reporting/ # Dashboard data, Slack/email alerts, CI artifacts
34
+ ```
35
+
36
+ ---
37
+
38
+ ## ๐Ÿš€ Quickstart
39
+
40
+ ### Prerequisites
41
+ - Python 3.10+
42
+ - Node.js 18+ (for Playwright/Electron targets)
43
+ - Appium 2.x (for mobile)
44
+
45
+ ### Install
46
+
47
+ ```bash
48
+ git clone https://github.com/mohigo/fusion-test.git
49
+ cd fusion-test
50
+ pip install -e ".[dev]"
51
+ ```
52
+
53
+ ### Set your API key
54
+
55
+ ```bash
56
+ export FUSIONTEST_API_KEY=your_key_here
57
+ # or copy .env.example โ†’ .env and fill in values
58
+ ```
59
+
60
+ ### Run your first test
61
+
62
+ ```bash
63
+ fusiontest run --goal "Log in, navigate to settings, update profile name" \
64
+ --platform android \
65
+ --app path/to/app.apk \
66
+ --locale en-US
67
+ ```
68
+
69
+ > **Full guide:** [docs/getting-started.md](docs/getting-started.md) โ€” covers all platforms (web, Android, iOS, Electron, Windows, macOS), Python API usage, configuration, dashboard, CI setup, and tips for writing good goals.
70
+
71
+ ---
72
+
73
+ ## ๐Ÿ“ Writing Test Goals
74
+
75
+ FusionTest accepts natural language goals. No code required.
76
+
77
+ ```yaml
78
+ # tests/goals/onboarding.yaml
79
+ name: User onboarding flow
80
+ platform: android
81
+ locale: en-US
82
+ goals:
83
+ - "Open the app and tap Get Started"
84
+ - "Enter email address and password on the signup screen"
85
+ - "Verify the home dashboard loads with a welcome message"
86
+ ```
87
+
88
+ Run it:
89
+
90
+ ```bash
91
+ fusiontest run --file tests/goals/onboarding.yaml
92
+ ```
93
+
94
+ ---
95
+
96
+ ## ๐Ÿ”Œ CI/CD Integration
97
+
98
+ ### GitHub Actions
99
+
100
+ ```yaml
101
+ - name: Run FusionTest
102
+ uses: fusionleap/fusiontest-action@v1
103
+ with:
104
+ goal-file: tests/goals/smoke.yaml
105
+ platform: android
106
+ api-key: ${{ secrets.FUSIONTEST_API_KEY }}
107
+ ```
108
+
109
+ ### Bitrise / Fastlane
110
+
111
+ See [docs/ci-integrations.md](docs/ci-integrations.md) for step-by-step guides.
112
+
113
+ ---
114
+
115
+ ## ๐Ÿ“Š Reporting
116
+
117
+ Every test run produces:
118
+ - Pass/fail summary with stability score
119
+ - Screen-by-screen action log
120
+ - Video recording of the test session
121
+ - Bug report with screenshot + repro steps (on failure)
122
+
123
+ Results are posted to your FusionTest dashboard and optionally to Slack.
124
+
125
+ ---
126
+
127
+ ## ๐Ÿ›  Configuration
128
+
129
+ ```yaml
130
+ # fusiontest.config.yaml
131
+ model:
132
+ backbone: mpnet-base # or: gpt-4o, claude-sonnet (for MVP/fallback)
133
+ precision_threshold: 0.97
134
+ max_retries: 3
135
+
136
+ guardrails:
137
+ loop_detection: true
138
+ loop_window: 5 # check last N screen states
139
+ backtrack_on_invalid: true
140
+ max_backtracks: 2
141
+
142
+ devices:
143
+ android:
144
+ farm: browserstack # or: aws-device-farm, local
145
+ desktop:
146
+ vision_fallback: true # enable for non-accessible UIs
147
+ playwright_for_electron: true
148
+
149
+ reporting:
150
+ slack_webhook: ${SLACK_WEBHOOK}
151
+ save_recordings: true
152
+ dashboard_url: https://app.fusionleap.io
153
+ ```
154
+
155
+ ---
156
+
157
+ ## ๐Ÿ—บ Roadmap
158
+
159
+ - [x] Core LLM action model (MPNet / GPT-4o / Claude backends)
160
+ - [x] Android adapter (UIAutomator2 + Appium)
161
+ - [x] iOS adapter (XCUITest + Appium)
162
+ - [x] Desktop adapter โ€” Playwright / Electron (with vision fallback)
163
+ - [x] Desktop adapter โ€” Windows (WinAppDriver / UIA)
164
+ - [x] Desktop adapter โ€” macOS (NSAccessibility + PyObjC)
165
+ - [x] Guardrails engine (invalid actions, loops, backtrack)
166
+ - [x] Goal completion verifier (LLM + heuristic fallback)
167
+ - [x] Video recording โ€” Playwright WebMโ†’MP4, Appium, Windows screenshot stitch
168
+ - [x] Reporting โ€” JSON, Slack webhooks, GitHub Actions annotations
169
+ - [x] CLI โ€” `fusiontest run / init / demo / report`
170
+ - [x] MPNet fine-tuning pipeline (`fusiontest/training/`)
171
+ - [x] FusionLeap cloud dashboard (React + Recharts + SaaS pages)
172
+ - [x] Dashboard backend API (FastAPI + PostgreSQL/Supabase)
173
+ - [x] SaaS backend โ€” auth, org management, API keys, webhooks, billing
174
+ - [x] Marketing website (Next.js, `website/`)
175
+ - [x] Integration tests โ€” runner, guardrails, goal verifier
176
+ - [x] CI/CD integration guides (`docs/ci-integrations.md`)
177
+ - [ ] Autonomous Test Discovery โ€” auto-crawl website โ†’ generate goals โ†’ execute
178
+ - [ ] RAG test library (few-shot goal โ†’ flow)
179
+ - [ ] Multi-locale parallel execution
180
+ - [ ] Cross-app flow testing (desktop)
181
+
182
+ ---
183
+
184
+ ## ๐Ÿค Contributing
185
+
186
+ See [CONTRIBUTING.md](CONTRIBUTING.md). We welcome issues, PRs, and test goal examples from the community.
187
+
188
+ ---
189
+
190
+ ## ๐Ÿ“„ License
191
+
192
+ MIT ยฉ [FusionLeap.io](https://fusionleap.io)
@@ -0,0 +1,2 @@
1
+ """FusionTest โ€” AI-powered UI testing for mobile and desktop."""
2
+ __version__ = "0.1.0"