Skip to content

test(e2e): capture scenario assertion failure evidence - #2368

Open
billsbooth wants to merge 1 commit into
callstack:mainfrom
billsbooth:codex/qa-scenario-failure-evidence
Open

test(e2e): capture scenario assertion failure evidence#2368
billsbooth wants to merge 1 commit into
callstack:mainfrom
billsbooth:codex/qa-scenario-failure-evidence

Conversation

@billsbooth

Copy link
Copy Markdown
Contributor

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 --run passes 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.

@thymikee

thymikee commented Sep 6, 2026

Copy link
Copy Markdown
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants