test(e2e): capture scenario assertion failure evidence - #2368
billsbooth wants to merge 1 commit into
Conversation
|
The change looks good at 6ef99b0: scenario assertions now reuse failure capture before cleanup, preserve the original error, and avoid capturing command failures twice. The deterministic regressions cover those boundaries. CI remains the blocker: iOS failed in the alert XCTest before fixture E2E, and Android failed at automation-press. Neither run verifies the new scenario-assertion capture path; confirm the uploaded screenshot and snapshot on a deliberate assertion failure when that lane can run. |
|
I refreshed this change on current The two-file replacement passed 11 focused tests and I tried updating this fork branch with an exact-head lease, but GitHub rejected the rebased push because the maintainer's OAuth token lacks |
Summary
Capture failure artifacts when a live scenario assertion fails outside a CLI step. The iOS long-press search exhausted allowed probes, then threw without preserving the failed screen or accessibility tree.
Scope
Two files: shared live-scenario harness and its deterministic tests. Capture before caller teardown, preserve the original exception, avoid duplicate capture for already-reported command failures, and leave successful scenarios unchanged. No gesture, driver, timeout, recovery or product behavior change.
Validation
At
6ef99b084,pnpm check:affected --runpasses all runnable gates: format, lint, types, Fallow and 101 Node integration cases (9 native skips). Six new cases cover allowed misses, pre-command assertions, duplicate suppression, unavailable capture, artifact I/O failure and success; three failed before implementation. CI pending. This does not fix the original iOS visibility failure.Verification
iOS failure contains four unsuccessful visibility probes and cleanup, but its uploaded fixture artifacts lack failure screenshot/snapshot. Source confirms only unexpected command failures previously invoked collection. The new tests assert original-error identity, owned-session flags, artifact output and coverage bookkeeping.
Automated Test Plan
Run
node scripts/node-test-tmpdir.ts --test test/integration/live-device-e2e-runtime.test.ts test/integration/live-device-e2e-failed-step-evidence.test.ts. All ten tests must pass with no device or account. Automatic native fixture lanes remain selected: on any scenario assertion, inspect failure report and capture artifacts before session cleanup; successful runs must create no failure captures. No production data, funds or external delivery required.