v2.7.0
Network mocking — change what the app receives, so its real error code runs
Three new tools. Everything runs in the injected interceptor, and rules live
server-side so they survive reload_app.
network_mock—replacereturns a canned response before the request
reaches the wire;tamperfetches the real one on a shadow XHR and mutates it
via dotted paths (set/remove/bodyReplace).times: Nfires a rule a
limited number of times, sotimes: 1reproduces the retry case.urlis a
substring, or a regex when slash-wrapped.network_condition—offline/slow/normal.offlinealso patches
NetInfo when installed, and verifies whether the patch took rather than
assuming, reportingpatched/reads-patched-only/not-installed.network_replay— re-issue a captured request with optional overrides,
through the app's own network stack.
Mocked traffic is never invisible: rows are tagged [MOCK m1], get_request_details
names the rule and any tamper warning, and every network read carries a banner
while rules are active. Regex patterns are validated server-side, because they
execute in the app's JS thread where catastrophic backtracking would freeze the
app under test.
Tutorial with worked examples: docs/network-mocking.md.
Fixes
- The XHR interceptor lost a cold-launch race and never retried. On a fresh
app launch the connect could land before the bundle definedXMLHttpRequest;
the single retry gave up and left capture dead for the whole run, with no
error. Now retries for ~10s. - Mocked requests were invisible on CDP-capture targets. A mocked request
never reaches the network, so CDP cannot report it — and the dedupe gate was
dropping the interceptor's record too. - Mock hit counts were stuck at zero whenever the SDK was installed, which
reads as "the rule never matched". get_logs/get_log_detailssymbolicate JS stacks.- The dev HTTP transport serializes
/mcprequests, so overlapping calls no
longer crash the server. - Text input: better targeting guards and field-decorated values.
Testing
The automated suite is unit-only and never drives an attached device. Integration
behaviour is verified by an agent against a running app. 1467 tests.