Skip to content

test(ios): retry transient simulator input false-successes - #2869

Open
quanruzhuoxiu wants to merge 3 commits into
mainfrom
test/ios-retry-transient-simulator-input
Open

test(ios): retry transient simulator input false-successes#2869
quanruzhuoxiu wants to merge 3 commits into
mainfrom
test/ios-retry-transient-simulator-input

Conversation

@quanruzhuoxiu

@quanruzhuoxiu quanruzhuoxiu commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • retry the deterministic iOS Simulator input step only when WDA source XML shows that the target field did not receive the expected value
  • preserve the original typeOnly first attempt, replay only observed value mismatches in idempotent replace mode, submit after the expected value is observed, and keep every attempt's XML in diagnostics
  • update report assertions to account for the exact number of targeted action attempts
  • cover first-attempt success, the permitted value-mismatch retry, immediate propagation of action/source failures, retry exhaustion, and invalid configuration

Why this retry boundary

The same deterministic smoke failed twice on two different GitHub-hosted runners because /wda/keys returned successfully while the Safari text field still had no value. WDA logged both taps at the expected coordinates, and the TodoMVC test passed afterward, so the simulator and Midscene session remained healthy.

This helper does not retry the full test or arbitrary exceptions. Tap/Input failures, /source request failures, and a missing target field still fail immediately. Only an observed value mismatch on the existing target field is retried, up to three total attempts.

Validation

  • pnpm install --frozen-lockfile (prepare built all 27 non-doc projects)
  • pnpm run lint
  • pnpm run type-check:tests
  • pnpm exec nx test @midscene/ios --output-style=static (13 files, 155 tests passed)
  • AI_TEST_TYPE=iOS MIDSCENE_IOS_SIMULATOR_SMOKE=1 pnpm --filter @midscene/ios exec vitest list tests/ai/ios-simulator-smoke.test.ts

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.

1 participant