@testrelic/maestro-analytics 1.1.0 → 1.2.0-next.54

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/README.md CHANGED
@@ -200,6 +200,8 @@ When the same setting is provided in multiple places, the following priority app
200
200
  |------|--------|
201
201
  | Flow pass/fail/skip | JUnit XML |
202
202
  | Per-step timing | commands-*.json |
203
+ | Per-step parameters (text typed, swipe direction, lat/lon, etc.) | commands-*.json (`details` field) |
204
+ | Retry / repeat command grouping | commands-*.json (`children` field) |
203
205
  | Assertions | commands-*.json |
204
206
  | Screenshots | --test-output-dir |
205
207
  | Video recordings | --test-output-dir |
@@ -208,6 +210,54 @@ When the same setting is provided in multiple places, the following priority app
208
210
  | Device/platform info | CLI output |
209
211
  | CI/CD context | Environment detection |
210
212
  | Git metadata | Local git |
213
+ | API / HTTP calls | mitmproxy (`--capture-network`) or HAR import (`--har-path`) |
214
+
215
+ ### Mobile API capture
216
+
217
+ Maestro is a black-box UI driver and can't see HTTP from inside the app the
218
+ way Playwright can. Two opt-in strategies are supported:
219
+
220
+ **Option A — auto-spawn mitmproxy (recommended for emulators):**
221
+
222
+ ```bash
223
+ npx testrelic-maestro test --capture-network --platform android ./flows
224
+ ```
225
+
226
+ Requires `mitmdump` on PATH (`brew install mitmproxy` /
227
+ `pipx install mitmproxy`). The SDK spawns mitmproxy with a bundled redaction
228
+ addon, sets the device's HTTP proxy via `adb` (Android) or prints simulator
229
+ setup instructions (iOS), and binds captured calls to each flow by timestamp.
230
+
231
+ | Flag | Description |
232
+ |------|-------------|
233
+ | `--capture-network` | Enable mitmproxy capture |
234
+ | `--proxy-port <n>` | Proxy listen port (default: 8080) |
235
+ | `--proxy-host <host>` | Proxy listen host (default: 127.0.0.1) |
236
+ | `--skip-cert-install` | Skip auto-installing the mitmproxy CA |
237
+ | `--proxy-include <pat>` | Only capture URLs matching this substring or regex (repeatable) |
238
+ | `--proxy-exclude <pat>` | Drop URLs matching this substring or regex (repeatable) |
239
+
240
+ Sensitive headers (`authorization`, `cookie`, `set-cookie`, `x-api-key`) and
241
+ body fields (`password`, `secret`, `token`, `apiKey`, `api_key`) are redacted
242
+ by the mitmproxy addon **before** anything is written to disk — secrets never
243
+ touch your filesystem.
244
+
245
+ **Option B — import a HAR file (works without any runtime deps):**
246
+
247
+ ```bash
248
+ npx testrelic-maestro test --har-path ./run.har ./flows
249
+ ```
250
+
251
+ Useful when you already capture traffic with Charles, Proxyman, or `mitmweb`
252
+ and want to fold it into the same TestRelic report.
253
+
254
+ **TLS pinning:** apps that pin certificates will reject the proxy. Build a
255
+ debug variant with pinning disabled or skip network capture for those flows.
256
+
257
+ **Cloud integration:** captured calls upload as `apiCalls` per test and show
258
+ up in the platform's Test Detail Network panel — and Ask AI's
259
+ `query_network_logs` tool can reason over them the same way it does for
260
+ Playwright tests.
211
261
 
212
262
  ## E2E Integration Test (Real Device Recording)
213
263