@capagents/forgeqe 3.1.2 → 3.1.3
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.
- package/HOW_TO_USE.md +5003 -2077
- package/README.md +155 -449
- package/dist/docs-site/docs/app-theme.css +30 -9
- package/dist/docs-site/docs/architecture/index.html +45 -515
- package/dist/docs-site/docs/architecture-reference/index.html +1781 -0
- package/dist/docs-site/docs/area-api/index.html +257 -116
- package/dist/docs-site/docs/area-automated-tests/index.html +1229 -419
- package/dist/docs-site/docs/area-browser/index.html +167 -125
- package/dist/docs-site/docs/area-data/index.html +178 -188
- package/dist/docs-site/docs/area-desktop/index.html +329 -282
- package/dist/docs-site/docs/area-mobile/index.html +138 -86
- package/dist/docs-site/docs/area-operations/index.html +567 -393
- package/dist/docs-site/docs/area-pull-requests/index.html +114 -32
- package/dist/docs-site/docs/area-quality/index.html +111 -49
- package/dist/docs-site/docs/area-release/index.html +180 -65
- package/dist/docs-site/docs/area-setup/index.html +742 -339
- package/dist/docs-site/docs/area-systems/index.html +32 -48
- package/dist/docs-site/docs/area-test-cases/index.html +387 -154
- package/dist/docs-site/docs/containers/index.html +87 -101
- package/dist/docs-site/docs/cost-architecture/index.html +4 -3
- package/dist/docs-site/docs/custom-agents-first-run/index.html +108 -50
- package/dist/docs-site/docs/desktop/index.html +277 -297
- package/dist/docs-site/docs/desktop-ci/index.html +15 -5
- package/dist/docs-site/docs/docs-tabs.js +56 -0
- package/dist/docs-site/docs/evidence/index.html +50 -49
- package/dist/docs-site/docs/feature-test-prompts/index.html +34 -24
- package/dist/docs-site/docs/get-started/index.html +464 -168
- package/dist/docs-site/docs/graphify/index.html +8 -7
- package/dist/docs-site/docs/guardrails/index.html +20 -4
- package/dist/docs-site/docs/index.html +4 -3
- package/dist/docs-site/docs/mobile/index.html +96 -76
- package/dist/docs-site/docs/model-routing/index.html +44 -18
- package/dist/docs-site/docs/overview/index.html +23 -7
- package/dist/docs-site/docs/product-graph/index.html +13 -12
- package/dist/docs-site/docs/product-knowledge/index.html +16 -5
- package/dist/docs-site/docs/product-views/index.html +7 -6
- package/dist/docs-site/docs/reference/index.html +95 -65
- package/dist/docs-site/docs/search.js +1 -1
- package/dist/docs-site/docs/using/index.html +444 -126
- package/dist/docs-site/docs/web-app/index.html +54 -51
- package/dist/forgeqe.js +1822 -1822
- package/dist/web/assets/Agent-3pV8Rwap.js +8 -0
- package/dist/web/assets/AgentWork-DAnmH0My.js +2 -0
- package/dist/web/assets/ApiTests-DW4MRFzG.js +10 -0
- package/dist/web/assets/Browse-Bd0ZZfc2.js +1 -0
- package/dist/web/assets/Chat-DnBUm_97.js +3 -0
- package/dist/web/assets/CommandPalette-B1O9aDTk.js +1 -0
- package/dist/web/assets/Compare-1v7_ca7z.js +1 -0
- package/dist/web/assets/Cost-CWrc4McH.js +1 -0
- package/dist/web/assets/Data-rWSiG4Cq.js +6 -0
- package/dist/web/assets/Desktop-3x6EQqos.js +1 -0
- package/dist/web/assets/DesktopReview-cSA10Rm3.js +1 -0
- package/dist/web/assets/Evidence-CKy3o7cw.js +1 -0
- package/dist/web/assets/{Explore-ObkEpUyS.js → Explore-CMAxWE_8.js} +2 -2
- package/dist/web/assets/Features-haQchkhA.js +1 -0
- package/dist/web/assets/{Flags-0-RniPJm.js → Flags-BaQjYi_t.js} +2 -2
- package/dist/web/assets/Flaky-DUuC0qTn.js +1 -0
- package/dist/web/assets/Impact-CP0H8ygo.js +3 -0
- package/dist/web/assets/Jobs-cYxoYd3i.js +5 -0
- package/dist/web/assets/KindPage-DWW8gN5_.js +6 -0
- package/dist/web/assets/Migration-Bsm7WU1d.js +2 -0
- package/dist/web/assets/PageAgent-c95zT2PJ.js +1 -0
- package/dist/web/assets/Product-BQSiR28a.js +7 -0
- package/dist/web/assets/Production-CAv0Vtoy.js +1 -0
- package/dist/web/assets/Quality-aQPaPYQc.js +1 -0
- package/dist/web/assets/Readiness-CkknP87n.js +1 -0
- package/dist/web/assets/Record-09IsC9U-.js +1 -0
- package/dist/web/assets/Regression-BL4MfN47.js +5 -0
- package/dist/web/assets/RelationGraph-Dg4fqt7l.js +1 -0
- package/dist/web/assets/Reports-CMV1l-iS.js +2 -0
- package/dist/web/assets/Response-DTBFBeKB.js +9 -0
- package/dist/web/assets/Responsive-DBRQ9FUO.js +3 -0
- package/dist/web/assets/RunDiff-CMDrnsA3.js +1 -0
- package/dist/web/assets/Runs-Dkeu6_vZ.js +2 -0
- package/dist/web/assets/Settings-KjKm8h-_.js +21 -0
- package/dist/web/assets/{Steps-D-YG0eJy.js → Steps-HYHK9psI.js} +1 -1
- package/dist/web/assets/TestCases-Cv6-OSv0.js +1 -0
- package/dist/web/assets/TestData-DbEfNlUE.js +2 -0
- package/dist/web/assets/TestDebt-DzHQIU4X.js +1 -0
- package/dist/web/assets/TestManagement-BgRTGHMT.js +1 -0
- package/dist/web/assets/Tosca-DZpHAtnH.js +3 -0
- package/dist/web/assets/WhatsNew-jp0c4WSV.js +1 -0
- package/dist/web/assets/coverage-BB9BLjGz.js +5 -0
- package/dist/web/assets/{dataParts-DbeCj9ga.js → dataParts-DEPK4eQE.js} +2 -2
- package/dist/web/assets/{diff-BStuTmsN.js → diff-CcNwLCX6.js} +1 -1
- package/dist/web/assets/{families-BBFFrUlo.js → families-gkpkloLT.js} +1 -1
- package/dist/web/assets/filters-C7phIFfd.js +1 -0
- package/dist/web/assets/fold-i73P-EDV.js +1 -0
- package/dist/web/assets/head-BtTqyLlj.js +1 -0
- package/dist/web/assets/{highlight-BcFZIf59.js → highlight-DZI39CzZ.js} +1 -1
- package/dist/web/assets/index-ClFOh63x.css +2 -0
- package/dist/web/assets/index-YGWJEkAT.js +64 -0
- package/dist/web/assets/input-C2vQ9O3a.js +1 -0
- package/dist/web/assets/logos-BmbNTDu2.js +1 -0
- package/dist/web/assets/palette-XFlqvgZl.js +1 -0
- package/dist/web/assets/{paletteCommands-Co-RlQ8q.js → paletteCommands-DsbD2ASU.js} +1 -1
- package/dist/web/assets/parts-DEVx2Sea.js +1 -0
- package/dist/web/assets/productParts-Bi-XjszL.js +1 -0
- package/dist/web/assets/qualityParts-Dbu01g7G.js +1 -0
- package/dist/web/assets/{recordTest-Cez2sDJO.js → recordTest--Wr40QdN.js} +1 -1
- package/dist/web/assets/route-Dg53WdFu.js +1 -0
- package/dist/web/index.html +6 -7
- package/docs/ARCHITECTURE.md +50 -563
- package/docs/ARCHITECTURE_REFERENCE.md +1484 -0
- package/docs/CONTAINERS.md +87 -87
- package/docs/CUSTOM_AGENTS_FIRST_RUN.md +125 -43
- package/docs/DESKTOP-CI.md +18 -3
- package/docs/DESKTOP.md +298 -297
- package/docs/MOBILE.md +103 -71
- package/docs/MODEL_ROUTING.md +48 -15
- package/docs/WEB_APP.md +49 -44
- package/docs/feature-test-prompts.md +29 -16
- package/docs/user-guide.html +5263 -2453
- package/guardrails/README.md +22 -2
- package/knowledge/README.md +15 -2
- package/package.json +1 -1
- package/prompts/brain.md +1 -0
- package/py/forgeqe_engine/recordsession.py +100 -24
- package/dist/web/assets/Agent-CPhmZdFX.js +0 -8
- package/dist/web/assets/AgentWork-BXdN9xgi.js +0 -2
- package/dist/web/assets/ApiTests-Do3xLjfB.js +0 -10
- package/dist/web/assets/Browse-WVkJT6Bs.js +0 -2
- package/dist/web/assets/Chat-CDc9UcQX.js +0 -3
- package/dist/web/assets/CommandPalette-BAZm62lV.js +0 -1
- package/dist/web/assets/Compare-Br6n9T9L.js +0 -1
- package/dist/web/assets/Cost-BBUyBu3Y.js +0 -1
- package/dist/web/assets/Data-Ch2DPEWp.js +0 -6
- package/dist/web/assets/Desktop-Qzoq-cQv.js +0 -1
- package/dist/web/assets/DesktopReview-CF_jQYAM.js +0 -1
- package/dist/web/assets/Evidence-C72Lj5_Q.js +0 -1
- package/dist/web/assets/Features-CQzNo_WP.js +0 -1
- package/dist/web/assets/Flaky-BPJvNLCA.js +0 -1
- package/dist/web/assets/Impact-CfccsL_k.js +0 -3
- package/dist/web/assets/Jobs-T6m4zhDy.js +0 -5
- package/dist/web/assets/KindPage-BDUvWe2p.js +0 -6
- package/dist/web/assets/Migration-Dqeh4x5u.js +0 -2
- package/dist/web/assets/PageAgent-DNjzIgeY.js +0 -1
- package/dist/web/assets/Product-nYV_scOV.js +0 -7
- package/dist/web/assets/Production-CGSbEWVa.js +0 -1
- package/dist/web/assets/Quality-BIypojZm.js +0 -1
- package/dist/web/assets/Readiness-BlRjwJRg.js +0 -1
- package/dist/web/assets/Record-v2KLI-_Z.js +0 -1
- package/dist/web/assets/Regression-B-jSt4Jz.js +0 -5
- package/dist/web/assets/RelationGraph-8J98lOVG.js +0 -1
- package/dist/web/assets/Reports-GI4u6SyW.js +0 -2
- package/dist/web/assets/Response-mhBThq2b.js +0 -9
- package/dist/web/assets/Responsive-DXu7Ra7K.js +0 -3
- package/dist/web/assets/RunDiff-D0SHDNp0.js +0 -1
- package/dist/web/assets/Runs-C1Gjdi9M.js +0 -2
- package/dist/web/assets/Settings-BGGeuvyF.js +0 -21
- package/dist/web/assets/TestCases-DC4w77eQ.js +0 -1
- package/dist/web/assets/TestData-CvKWRVVV.js +0 -2
- package/dist/web/assets/TestDebt-D8YzN29_.js +0 -1
- package/dist/web/assets/TestManagement-C5cDCqrD.js +0 -1
- package/dist/web/assets/Tosca-BGUv3RiJ.js +0 -3
- package/dist/web/assets/WhatsNew-B_Gyuv8O.js +0 -1
- package/dist/web/assets/coverage-BMP6ELFJ.js +0 -5
- package/dist/web/assets/filters-CnAMr286.js +0 -1
- package/dist/web/assets/fold-D_O_VZui.js +0 -1
- package/dist/web/assets/head-CRo48rPt.js +0 -1
- package/dist/web/assets/index-B3JsM7tv.js +0 -64
- package/dist/web/assets/index-CafApcbZ.css +0 -2
- package/dist/web/assets/input-CtzK50ZF.js +0 -1
- package/dist/web/assets/line-icons-rdF8DYDJ.js +0 -1
- package/dist/web/assets/logos-D4oVWzqa.js +0 -1
- package/dist/web/assets/palette-DAaGSao7.js +0 -1
- package/dist/web/assets/parts-D357Wolo.js +0 -1
- package/dist/web/assets/productParts-B8oHRCJF.js +0 -1
- package/dist/web/assets/qualityParts-BLkmIfDY.js +0 -1
- package/dist/web/assets/route-BloYJWgw.js +0 -1
package/docs/MOBILE.md
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
# ForgeQE mobile: Android and iOS apps
|
|
2
2
|
|
|
3
|
-
Status:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
with a simulator).
|
|
3
|
+
Status: tested on an Android emulator, where ForgeQE explores and replays the emulator's Settings app with Appium, and
|
|
4
|
+
replays the same workflow with Maestro. iOS works the same way through Appium's XCUITest driver, but is not yet tested
|
|
5
|
+
by the ForgeQE team (it needs a Mac with a simulator).
|
|
7
6
|
|
|
8
7
|
ForgeQE drives mobile apps two ways, and one workflow format runs on both:
|
|
9
8
|
|
|
@@ -18,26 +17,64 @@ ForgeQE drives mobile apps two ways, and one workflow format runs on both:
|
|
|
18
17
|
|
|
19
18
|
## Use
|
|
20
19
|
|
|
20
|
+
What the web app and the terminal each offer:
|
|
21
|
+
|
|
22
|
+
| Task | Web app | Terminal |
|
|
23
|
+
|---|---|---|
|
|
24
|
+
| Set up Appium on this computer | **Settings › Set up** | `forgeqe mobile setup` |
|
|
25
|
+
| Devices and drivers | **Settings › Mobile** | `forgeqe.yaml`, `forgeqe mobile devices` |
|
|
26
|
+
| Record your own steps | **Record › Mobile app** | not available |
|
|
27
|
+
| Review and replay a recording | the recording's review | `forgeqe mobile replay` |
|
|
28
|
+
| Explore a goal with the model | in a chat | `forgeqe mobile explore` |
|
|
29
|
+
| Run your team's Maestro flows | in a chat | `forgeqe mobile maestro` |
|
|
30
|
+
| Upload a build to TestMu AI | in a chat | `forgeqe mobile upload` |
|
|
31
|
+
|
|
32
|
+
**Setting up.** For an emulator or phone on this computer, ForgeQE installs Appium and its drivers once (see
|
|
33
|
+
[Appium on this computer](#appium-on-this-computer)). A device cloud needs none of it.
|
|
34
|
+
|
|
35
|
+
**Web app**
|
|
36
|
+
|
|
37
|
+
1. Open **Settings › Set up**.
|
|
38
|
+
2. Press **Install what's missing**.
|
|
39
|
+
|
|
40
|
+
**Terminal**
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
forgeqe mobile setup # Appium and its drivers, pinned, into ForgeQE's tools folder (once)
|
|
44
|
+
forgeqe mobile doctor # does the Appium server answer (the cloud's hub and sign-in when every device in use is
|
|
45
|
+
# on TestMu or BrowserStack), is maestro installed? (or, with mobile.maestro.testmu:
|
|
46
|
+
# is the hyperexecute CLI there, are the user and key set?)
|
|
47
|
+
forgeqe mobile apps # the mobile apps of the active environment
|
|
48
|
+
forgeqe mobile devices --like "Pixel 8-14" # the devices TestMu or BrowserStack has, most like one first
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**Replaying a workflow.** Replay runs the steps with no model, on Appium or Maestro.
|
|
52
|
+
|
|
53
|
+
**Web app**
|
|
54
|
+
|
|
55
|
+
1. Open **Record** and open the recording (the list's filter has **Mobile apps**).
|
|
56
|
+
2. Open the **Last run** tab and press **Replay**, once or for each row of a data file.
|
|
57
|
+
|
|
58
|
+
**Terminal**
|
|
59
|
+
|
|
21
60
|
```bash
|
|
22
|
-
forgeqe mobile setup # Appium and its drivers, pinned, into ForgeQE's tools folder (once)
|
|
23
|
-
forgeqe mobile doctor # does the Appium server answer (the cloud's hub and sign-in when every
|
|
24
|
-
# device in use is on TestMu or BrowserStack), is maestro installed? (or, with
|
|
25
|
-
# mobile.maestro.testmu: is the hyperexecute CLI there, are the user and key set?)
|
|
26
|
-
forgeqe mobile apps # the mobile apps of the active environment
|
|
27
|
-
forgeqe mobile devices --like "Pixel 8-14" # the devices TestMu or BrowserStack has, most like one first
|
|
28
|
-
forgeqe mobile explore "Sign in as the courier and accept the first delivery" --app courier
|
|
29
61
|
forgeqe mobile replay .forgeqe/reports/mobile-explore-…/workflow.yaml
|
|
30
62
|
forgeqe mobile replay workflow.yaml --driver maestro
|
|
31
63
|
forgeqe mobile replay mobile-tests/ --data couriers.csv --junit results.xml
|
|
32
|
-
forgeqe mobile
|
|
33
|
-
forgeqe mobile flow workflow.yaml
|
|
34
|
-
forgeqe mobile validate workflow.yaml
|
|
64
|
+
forgeqe mobile validate workflow.yaml # check it without running it
|
|
65
|
+
forgeqe mobile flow workflow.yaml # print a workflow as a Maestro flow
|
|
35
66
|
```
|
|
36
67
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
68
|
+
**Exploring a goal, and the team's flows.** The model does a goal in the app and the run is saved as a workflow; your
|
|
69
|
+
team's own Maestro flows run after an allowlist check. In the web app these are asked for in a chat ("sign in to the
|
|
70
|
+
courier app and save it as a test", "replay the courier login on Maestro", "run our Maestro flows"); the agent asks
|
|
71
|
+
before each one starts, and it fixes a mobile workflow after a failed replay after showing you the change, as for a
|
|
72
|
+
desktop one. At a terminal, ask the same in `forgeqe start`, or run:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
forgeqe mobile explore "Sign in as the courier and accept the first delivery" --app courier
|
|
76
|
+
forgeqe mobile maestro .maestro/ # the team's flows
|
|
77
|
+
```
|
|
41
78
|
|
|
42
79
|
## Apps and settings
|
|
43
80
|
|
|
@@ -81,11 +118,20 @@ Each run writes a folder under the reports folder (`mobile-explore-…`, `mobile
|
|
|
81
118
|
|
|
82
119
|
## Devices
|
|
83
120
|
|
|
84
|
-
Say what each device is and where it runs
|
|
85
|
-
|
|
86
|
-
`LT:Options`, …), the cloud's hub address, Maestro's `--device`, and TestMu's HyperExecute YAML. Nobody types
|
|
121
|
+
Say what each device is and where it runs. ForgeQE builds what Appium, Maestro and the cloud need from that and the
|
|
122
|
+
app (Appium's capabilities, the cloud's hub address, Maestro's device, TestMu's HyperExecute file). Nobody types
|
|
87
123
|
capabilities.
|
|
88
124
|
|
|
125
|
+
**Adding a device.**
|
|
126
|
+
|
|
127
|
+
**Web app**
|
|
128
|
+
|
|
129
|
+
1. Open **Settings › Mobile**.
|
|
130
|
+
2. Add the device with its **Type**, **Platform**, **Device model**, **OS version** (and, on this computer, **Device id**
|
|
131
|
+
or **Emulator to start**), and **Use in runs**.
|
|
132
|
+
|
|
133
|
+
**Terminal**
|
|
134
|
+
|
|
89
135
|
Devices on this computer are in forgeqe.yaml:
|
|
90
136
|
|
|
91
137
|
```yaml
|
|
@@ -107,7 +153,7 @@ mobile:
|
|
|
107
153
|
os_version: "17.2"
|
|
108
154
|
```
|
|
109
155
|
|
|
110
|
-
`avd` names an Android emulator for Appium to start for the run, instead of one already running. With
|
|
156
|
+
**What a device's settings mean.** `avd` names an Android emulator for Appium to start for the run, instead of one already running. With
|
|
111
157
|
`mobile.headless: true` (Settings → Mobile, Emulators without a window) Appium starts those emulators, and iOS
|
|
112
158
|
simulators, without a window (`appium:isHeadless`); a real device and a cloud's devices are never affected.
|
|
113
159
|
|
|
@@ -134,9 +180,8 @@ mobile:
|
|
|
134
180
|
|
|
135
181
|
- **Which devices run.** Every device with `enabled` on (the default), of the app's platform: an Android workflow
|
|
136
182
|
skips the iOS devices. `--devices pixel8,galaxy` (or the agent's `devices`) names some for one run.
|
|
137
|
-
- **At once.** `mobile.parallel` of them at a time
|
|
138
|
-
|
|
139
|
-
server. On TestMu, `mobile.parallel` also caps HyperExecute's concurrency.
|
|
183
|
+
- **At once.** `mobile.parallel` of them at a time (**Devices at once** in Settings › Mobile). Devices on this computer
|
|
184
|
+
running at once get their own ports on the one Appium server. On TestMu, `mobile.parallel` also caps HyperExecute's concurrency.
|
|
140
185
|
- **Maestro** runs on each device on this computer, and as one HyperExecute job for TestMu's real devices (and one
|
|
141
186
|
for its emulators). It does not run on BrowserStack here: replay those with Appium.
|
|
142
187
|
- **Results.** Each device's run is in a folder of its own inside the run's folder, with `devices.json` listing each
|
|
@@ -234,17 +279,16 @@ control that is on screen. The app's text is passed as data.
|
|
|
234
279
|
it as it was is told to the model as such, is not counted as progress, and a swipe or scroll that moved nothing is
|
|
235
280
|
not saved. After 4 such actions in a row (or the same check again) the run stops and says why, instead of spending
|
|
236
281
|
the step budget.
|
|
237
|
-
- **Gestures.** On Android a swipe is a finger drag
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
`scroll`.
|
|
282
|
+
- **Gestures.** On Android a swipe is a finger drag, kept clear of the screen's edges, where a swipe is the system's.
|
|
283
|
+
A scroll is a drag inside the screen's scrolling view, checked: when the content did not move (the drag started on a
|
|
284
|
+
carousel, which took it), it is tried again from another point. iOS uses its own swipe and scroll.
|
|
241
285
|
- **Memory.** A failed explore of a goal is resumed from its last action (a tap, a type), never through the swipes
|
|
242
286
|
and backs after it, which are the search that failed.
|
|
243
287
|
|
|
244
288
|
## Appium on this computer
|
|
245
289
|
|
|
246
|
-
For an emulator or a phone on this computer, `forgeqe mobile setup` (or
|
|
247
|
-
when a device in use is on this computer) installs Appium 3.9.0 with the UiAutomator2 driver (and XCUITest on a Mac)
|
|
290
|
+
For an emulator or a phone on this computer, `forgeqe mobile setup` (or **Install what's missing** in **Settings › Set
|
|
291
|
+
up**, when a device in use is on this computer) installs Appium 3.9.0 with the UiAutomator2 driver (and XCUITest on a Mac)
|
|
248
292
|
into ForgeQE's tools folder, pinned, with no install script run. A run on a device here then starts that Appium by
|
|
249
293
|
itself when nothing answers at `mobile.appium.url`, on 127.0.0.1, and stops it when ForgeQE exits; an Appium already
|
|
250
294
|
running there (your own) is used as it is. It finds the Android SDK (`ANDROID_HOME`, else Android Studio's folder) and
|
|
@@ -253,15 +297,21 @@ says what is missing. A device cloud (TestMu AI, BrowserStack) needs none of it:
|
|
|
253
297
|
|
|
254
298
|
## Record by hand
|
|
255
299
|
|
|
256
|
-
|
|
257
|
-
|
|
300
|
+
In the web app only: recording a mobile test by hand has no terminal command.
|
|
301
|
+
|
|
302
|
+
1. Open **Record** and pick **Mobile app**.
|
|
303
|
+
2. Pick the app and a device (one of this computer's, or TestMu AI's or BrowserStack's).
|
|
304
|
+
3. Press **Record**. The device's screen appears on the page with its controls outlined.
|
|
305
|
+
4. Press **Stop** when done.
|
|
306
|
+
|
|
307
|
+
**What you can do while recording.**
|
|
308
|
+
|
|
258
309
|
|
|
259
310
|
- **Tap** a control on the screen and it is tapped on the device; a field opens a box to type into it (plain text, or a
|
|
260
311
|
saved secret by its name). **Check** adds a check of what a control shows now, **Hold** (a long press) and **Wait for** do
|
|
261
312
|
what they say (pick what a click on the screen does above it). Under the screen: scroll, swipe, Back, Enter, hide the keyboard, wait.
|
|
262
313
|
- Each action is done on the device through the locator ForgeQE records for it, so a step a replay could not find is
|
|
263
|
-
never kept. Locators come from the app's own
|
|
264
|
-
ranks a web page's: the resource id or accessibility identifier, the accessibility label, what the control is and
|
|
314
|
+
never kept. Locators come from the app's own controls, ranked as Playwright ranks a web page's: the resource id or accessibility identifier, the accessibility label, what the control is and
|
|
265
315
|
says, its text (a field's text and text that reads as data last). Only one that matches that control alone on the
|
|
266
316
|
screen is kept; alike rows are found inside their uniquely named parent, a position among them only as the last
|
|
267
317
|
resort; up to three more become fallbacks. Android's own ids (`android:id/button1`) come after the text. The Steps
|
|
@@ -295,9 +345,10 @@ computer's, or TestMu AI's or BrowserStack's), and the device's screen appears o
|
|
|
295
345
|
- Stop saves `workflow.yaml`, a picture of each step with the controls it shows, and a report in
|
|
296
346
|
`.forgeqe/reports/mobile-record-…/`, and opens the workflow's review, as a desktop recording does: change a step's
|
|
297
347
|
control, add a check by clicking a control on a step's picture, make a typed value test data or a secret
|
|
298
|
-
(`mobile.secrets`), and replay it there (
|
|
348
|
+
(`mobile.secrets`), and replay it there (rows from a data file). At a terminal, replay it with `forgeqe mobile
|
|
349
|
+
replay`.
|
|
299
350
|
|
|
300
|
-
It runs through Appium on every device, so a cloud device is recorded the same way as an emulator. An Android app that
|
|
351
|
+
**Devices and app start.** It runs through Appium on every device, so a cloud device is recorded the same way as an emulator. An Android app that
|
|
301
352
|
hands its first screen over at once (a splash, then a sign-in) starts fine: sessions wait for any of the app's
|
|
302
353
|
screens (`appium:appWaitActivity: "*"`, which `mobile.appium.capabilities` can change).
|
|
303
354
|
|
|
@@ -327,17 +378,24 @@ A refused flow does not run, and the error names the command.
|
|
|
327
378
|
|
|
328
379
|
## TestMu AI (formerly LambdaTest)
|
|
329
380
|
|
|
330
|
-
Both drivers run on TestMu's devices. Upload the app once, then use the `lt://` id it returns as the app's `app
|
|
381
|
+
Both drivers run on TestMu's devices. Upload the app once, then use the `lt://` id it returns as the app's `app`.
|
|
382
|
+
|
|
383
|
+
**Uploading a build.**
|
|
384
|
+
|
|
385
|
+
**Web app**
|
|
386
|
+
|
|
387
|
+
In a chat, ask in words ("upload builds/courier.apk to TestMu for courier"). The agent asks first, uploads the build (it
|
|
388
|
+
must be inside the working folder), and saves the `lt://` id as that app's `app:` in forgeqe.yaml.
|
|
389
|
+
|
|
390
|
+
**Terminal**
|
|
331
391
|
|
|
332
392
|
```bash
|
|
333
393
|
forgeqe mobile upload courier.apk # → lt://APP… (--virtual for TestMu's emulators)
|
|
334
394
|
```
|
|
335
395
|
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
The user and key come from `LT_USERNAME` and `LT_ACCESS_KEY` (or the variables the config names), for example in a
|
|
340
|
-
`.env` file in the project folder. `samples/mobile-testmu/` is a ready project with TestMu's Wikipedia sample app.
|
|
396
|
+
**Signing in to TestMu AI.** The user and key come from `LT_USERNAME` and `LT_ACCESS_KEY` (or the variables the config names), for example in a
|
|
397
|
+
`.env` file in the project folder (in the web app, **TestMu AI user** and **TestMu AI key** in Settings › Mobile name
|
|
398
|
+
the variables). `samples/mobile-testmu/` is a ready project with TestMu's Wikipedia sample app.
|
|
341
399
|
|
|
342
400
|
```yaml
|
|
343
401
|
mobile:
|
|
@@ -390,7 +448,7 @@ mobile:
|
|
|
390
448
|
- The access key is passed to the CLI as an argument. It is removed from the CLI's output and from every file in the
|
|
391
449
|
run folder. Neither the user name nor the key is passed to the flows' environment.
|
|
392
450
|
- `maestro` and the `hyperexecute` CLI are started without ForgeQE's own secrets (the model's key, service tokens) in
|
|
393
|
-
their environment
|
|
451
|
+
their environment.
|
|
394
452
|
- `samples/mobile-testmu` runs all three on TestMu (Appium, Maestro with a workflow, a team flow) with TestMu's
|
|
395
453
|
Wikipedia sample app, once `LT_USERNAME` and `LT_ACCESS_KEY` are set.
|
|
396
454
|
|
|
@@ -401,35 +459,9 @@ mobile:
|
|
|
401
459
|
- **Locators** go into XPath as quoted literals, so a target cannot change the query.
|
|
402
460
|
- **Secrets:** `{{secret:NAME}}` reads only `mobile.secrets` and the environment's secrets, and ForgeQE's own keys are
|
|
403
461
|
refused there. Explore types a secret from its placeholder, so the model never sees the value.
|
|
404
|
-
- **The
|
|
462
|
+
- **The mobile runner's environment** holds system settings, the profile's key, the listed secrets, the cloud's user and key,
|
|
405
463
|
and `JAVA_HOME` / `ANDROID_HOME`, nothing else.
|
|
406
464
|
- **Cloud credentials** come from the variables `mobile.appium.username_env` and `access_key_env` name; a user or key in
|
|
407
465
|
the URL is refused. TLS is verified as usual.
|
|
408
466
|
- **App builds** are absolute paths to an app file, https URLs, or a device cloud's own upload ids (`bs://`, `lt://`,
|
|
409
467
|
`storage:filename=`); `file://` and other schemes are refused.
|
|
410
|
-
|
|
411
|
-
## Code
|
|
412
|
-
|
|
413
|
-
| File | Contents |
|
|
414
|
-
|---|---|
|
|
415
|
-
| `src/mobile/command.ts` | `forgeqe mobile`: apps, doctor, explore, replay (folders, `--data`, `--junit`, `--driver`), maestro, flow, validate |
|
|
416
|
-
| `src/mobile/run.ts` | Requests to the mobile engine, its environment, Maestro flow paths, the doctor |
|
|
417
|
-
| `src/mcp/mobiletools.ts` | ForgeQE's agent's `mobile_explore`, `mobile_replay`, `mobile_maestro` |
|
|
418
|
-
| `py/forgeqe_mobile/appium_driver.py` | The Appium driver: W3C WebDriver over HTTP, the replay `Driver` |
|
|
419
|
-
| `py/forgeqe_mobile/maestro.py` | Workflows as Maestro flows, the allowlist for team flows, running `maestro test` |
|
|
420
|
-
| `py/forgeqe_mobile/hyperexecute.py` | Maestro on TestMu: the HyperExecute project and running its CLI |
|
|
421
|
-
| `py/forgeqe_mobile/explore.py` | The model's action loop on Appium |
|
|
422
|
-
| `py/forgeqe_mobile/record.py` | Recording by hand: the screen's controls and their locators, the page's commands as steps |
|
|
423
|
-
| `py/forgeqe_mobile/locators.py` | How a recorded control is found again: ranked candidates, unique on the screen, fallbacks |
|
|
424
|
-
| `py/forgeqe_mobile/webview.py` | A web page inside the app: the element at a spot, its web locators, their queries |
|
|
425
|
-
| `py/forgeqe_mobile/magiclink.py` | Magic links: the logins with a mailbox, the newest link read and opened on the device |
|
|
426
|
-
| `src/mobile/record.ts` | The commands the Record page may send a mobile recording, checked |
|
|
427
|
-
| `src/mobile/setup.ts` | `forgeqe mobile setup`: the pinned Appium and drivers, finding the SDK and Java, starting Appium here |
|
|
428
|
-
| `py/forgeqe_mobile/service.py` | `serve`: replay, explore and maestro runs, `run.json` |
|
|
429
|
-
| `py/forgeqe_mobile/apps.py` | The mobile app allowlist and its capabilities |
|
|
430
|
-
|
|
431
|
-
The rest is shared with the desktop engine: `forgeqe_desktop.workflow` validates both formats, and `replay.py`,
|
|
432
|
-
`heal.py`, `checks.py` and `visual.py` run on either driver. `memory.py` (app memory, under `<memory dir>/mobile/`) lets an explore replay what earlier explores of the app did before it calls the model, and a replay reuse a target an earlier heal found.
|
|
433
|
-
|
|
434
|
-
Tests: `<engine-python> -m pytest tests/desktop/test_mobile.py -q` (a fake Appium server and a stand-in Maestro; any
|
|
435
|
-
OS), and `bun test tests/mobile.test.ts`.
|
package/docs/MODEL_ROUTING.md
CHANGED
|
@@ -8,6 +8,18 @@ model can do: ForgeQE finds out.
|
|
|
8
8
|
|
|
9
9
|
## Turn it on
|
|
10
10
|
|
|
11
|
+
**Choosing how models are routed.**
|
|
12
|
+
|
|
13
|
+
**Web app**
|
|
14
|
+
|
|
15
|
+
1. Open **Settings › Routing**.
|
|
16
|
+
2. Set **Routing** to **Off: the profile in use**, **Auto** or **Shadow (log only)**.
|
|
17
|
+
3. Set **Strategy** to **Balanced: capability weighed against price**, **Most capable for every area** or **Cheapest:
|
|
18
|
+
good enough for each area**.
|
|
19
|
+
4. Leave **Fall back to a working model** on to use a working model when one has no key or its sign-in is refused.
|
|
20
|
+
|
|
21
|
+
**Terminal**
|
|
22
|
+
|
|
11
23
|
In `forgeqe.yaml`:
|
|
12
24
|
|
|
13
25
|
```yaml
|
|
@@ -17,7 +29,7 @@ llm:
|
|
|
17
29
|
strategy: balanced # balanced (the default) | capability | cost
|
|
18
30
|
```
|
|
19
31
|
|
|
20
|
-
`forgeqe init` writes `routing: auto` for new projects. With no `routing` line it is off. `shadow` decides and logs each pick in the session log
|
|
32
|
+
**What each setting does.** `forgeqe init` writes `routing: auto` for new projects. With no `routing` line it is off. `shadow` decides and logs each pick in the session log
|
|
21
33
|
(`model.route`) but changes nothing, so you can see what the router would do before you let it. Shadow still runs the
|
|
22
34
|
live checks and the rating call described below.
|
|
23
35
|
|
|
@@ -28,9 +40,15 @@ profile first, and ForgeQE says why and how to fix the first. When none works, t
|
|
|
28
40
|
Only `--profile` skips this. With `auto`, a GitHub Copilot seat counts as costing nothing more per call, so it is picked
|
|
29
41
|
whenever it is rated good enough.
|
|
30
42
|
|
|
31
|
-
|
|
43
|
+
**Seeing the picks.** Each area's pick, and every model's check with its fix.
|
|
32
44
|
|
|
33
|
-
|
|
45
|
+
**Web app**
|
|
46
|
+
|
|
47
|
+
Open **Cost** and look at **Model router**: each area's pick and the models that actually answered for it.
|
|
48
|
+
|
|
49
|
+
**Terminal**
|
|
50
|
+
|
|
51
|
+
```bash
|
|
34
52
|
forgeqe models --routes
|
|
35
53
|
```
|
|
36
54
|
|
|
@@ -47,8 +65,16 @@ forgeqe models --routes
|
|
|
47
65
|
|
|
48
66
|
## A default model for each agent
|
|
49
67
|
|
|
50
|
-
To give one agent its own model whatever `routing` says, name an `llms.json` profile for it
|
|
51
|
-
|
|
68
|
+
To give one agent its own model whatever `routing` says, name an `llms.json` profile for it.
|
|
69
|
+
|
|
70
|
+
**Web app**
|
|
71
|
+
|
|
72
|
+
1. Open **Settings › Routing**.
|
|
73
|
+
2. Under **Areas of work**, open the area and pick the agent's model (**The area's model** leaves it to the area).
|
|
74
|
+
|
|
75
|
+
**Terminal**
|
|
76
|
+
|
|
77
|
+
Name the profile under `llm.agents` in `forgeqe.yaml`:
|
|
52
78
|
|
|
53
79
|
```yaml
|
|
54
80
|
llm:
|
|
@@ -59,7 +85,7 @@ llm:
|
|
|
59
85
|
forgeqe-review: azure-mini # its reviewer
|
|
60
86
|
```
|
|
61
87
|
|
|
62
|
-
An agent left out uses its area's pick. The agents are `forgeqe`, `engine`, `forgeqe-test`, `forgeqe-heal`,
|
|
88
|
+
**Which agents can have their own model.** An agent left out uses its area's pick. The agents are `forgeqe`, `engine`, `forgeqe-test`, `forgeqe-heal`,
|
|
63
89
|
`forgeqe-migrate`, `forgeqe-api`, `forgeqe-review`, `forgeqe-pr-review`, `forgeqe-judge`, `forgeqe-defect-rca`,
|
|
64
90
|
`forgeqe-refine`, `forgeqe-find`, `forgeqe-test-plan`, `forgeqe-api-plan`, `forgeqe-explore-plan`, `forgeqe-data`,
|
|
65
91
|
`forgeqe-agent-builder` and `forgeqe-bug-report`; `forgeqe models --routes` lists each with the model it gets. An unknown agent or a profile not
|
|
@@ -105,7 +131,7 @@ size of the prompt change. Each pick is shown once ("Model for planning: mini (
|
|
|
105
131
|
|
|
106
132
|
The first routed call in a project with two or more usable profiles does this once:
|
|
107
133
|
|
|
108
|
-
1. **A live check of each model
|
|
134
|
+
1. **A live check of each model:** one short structured answer and one image.
|
|
109
135
|
This finds a deployment that does not exist, a wrong key, and whether the model really takes images. It also
|
|
110
136
|
measures how fast the model answers.
|
|
111
137
|
2. **One rating call.** The active profile's model receives the facts of every model, never a key, an endpoint or an
|
|
@@ -120,14 +146,22 @@ The live checks reach every profile in `llms.json` that has a key, whatever `llm
|
|
|
120
146
|
data on one deployment; the checks carry nothing from your runs. To send nothing to the other profiles at all, use
|
|
121
147
|
`routing: off`, keep one profile with a key, or pass `--profile`.
|
|
122
148
|
|
|
123
|
-
|
|
149
|
+
**Checking and rating again** (for example, after a deployment changed its model). This is done at a terminal only:
|
|
124
150
|
|
|
125
|
-
```
|
|
151
|
+
```bash
|
|
126
152
|
forgeqe models --routes --profile-models
|
|
127
153
|
```
|
|
128
154
|
|
|
129
155
|
## Limit what an area may use
|
|
130
156
|
|
|
157
|
+
**Web app**
|
|
158
|
+
|
|
159
|
+
1. Open **Settings › Routing**.
|
|
160
|
+
2. Under **Areas of work**, pick one or more models for the area. None picked means any configured model; one model
|
|
161
|
+
picked pins the area to it.
|
|
162
|
+
|
|
163
|
+
**Terminal**
|
|
164
|
+
|
|
131
165
|
```yaml
|
|
132
166
|
llm:
|
|
133
167
|
routing: auto
|
|
@@ -137,7 +171,7 @@ llm:
|
|
|
137
171
|
planning: auto # any configured model (the default)
|
|
138
172
|
```
|
|
139
173
|
|
|
140
|
-
A name in `routes` must be a profile in `llms.json`, and an area must be one of the six above. Anything else stops
|
|
174
|
+
**What is checked.** A name in `routes` must be a profile in `llms.json`, and an area must be one of the six above. Anything else stops
|
|
141
175
|
ForgeQE at start with a message that names it.
|
|
142
176
|
|
|
143
177
|
## What routing cost, and what it saved
|
|
@@ -147,13 +181,12 @@ Every model call is recorded with the area it was made for and what chose its mo
|
|
|
147
181
|
or an escalation. It goes in the usage ledger beside the tokens, so the question "which model wrote the tests, and
|
|
148
182
|
what did that cost" is answered from the calls themselves and not from the logs.
|
|
149
183
|
|
|
150
|
-
Where to see it:
|
|
184
|
+
Where to see it, in the web app only (at a terminal, `forgeqe models --routes` shows the picks themselves):
|
|
151
185
|
|
|
152
|
-
- **Cost › By area of work
|
|
153
|
-
- **Cost ›
|
|
154
|
-
- **Cost › What routing cost
|
|
186
|
+
- **Cost › By area of work**: what each area spent.
|
|
187
|
+
- **Cost › Model router**: each area's pick, and a **Ran on** column with the models that actually answered for it.
|
|
188
|
+
- **Cost › What routing cost**: each area against running everything on `llm.active`, which is what `routing: off`
|
|
155
189
|
does. Both sides are priced at today's prices, so the difference is the models' and not a price that moved since.
|
|
156
|
-
- `forgeqe models --routes` still shows the picks themselves.
|
|
157
190
|
|
|
158
191
|
Two things to read carefully:
|
|
159
192
|
|