Xcode UI Test Stabilizer
SkillMonitoring & opsBuild and stabilize Xcode UI end-to-end tests with XCUIApplication/xcodebuild for new or unreliable automation, covering environment setup, focus/input reliability, waits, logs, attachments, and flakiness triage.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the Xcode UI Test Stabilizer skill
What this skill tells your AI
The instructions your AI receives, as published by xopoko/build-swift-apps in skills/xcode-ui-test-stabilizer/SKILL.md and read by ahel’s review.
Before invoking Apple-only binaries, confirm the execution context is macOS. From Windows or Linux, run those steps in a Mac SSH project or through an already configured remote transport; do not retry missing Apple binaries locally.
Overview
Build deterministic UI end-to-end tests and debug flaky runs. Prefer stable accessibility identifiers, environment-driven setup, and explicit wait conditions. Always attach logs and screenshots on failure.
Workflow
-
Define the flow and success signals.
- Identify the UI state that proves success (accessibility identifiers, log markers, or system-visible views).
- Decide which logs to capture (app log, build log, UI test log).
-
Add or update the UI test.
- Use stable identifiers (avoid labels that can change or be localized).
- Avoid typing into complex text components when possible; prefer injecting text via test-only defaults.
- Gate test-only behavior behind env flags so production behavior is unchanged.
-
Stabilize the app for UI tests.
- Ensure the app activates and brings windows to front in UI test mode.
- Disable modal blockers or auto-approve when tests run.
- Use in-memory persistence for tests if persistent stores are fragile.
-
Run the test with the provided script or your own command.
- Use
scripts/run_ui_test.sh(from this skill) or runxcodebuild testwith-only-testing.
- Use
-
Triage failures.
- Attach logs and screenshots.
- Search logs for build/preview errors and unexpected user-stop messages.
- Iterate until the test is deterministic.
Stability checklist (quick wins)
- Use
waitForExistencefor every critical element. - Assert the app is running foreground before input.
- Avoid
typeTextfor long text; prefer env-injected defaults. - Click the window before interacting.
- Keep timeouts explicit and generous for CI machines.
- Attach logs and screenshots on failure.
References
- Read
references/ui-e2e-playbook.mdfor generic flags, focus fixes, typing workarounds, and debugging patterns.
Resources
scripts/
scripts/run_ui_test.sh— run a single UI test with optional .env loading and xcodebuild args.
references/
references/ui-e2e-playbook.md— general UI E2E playbook, flags, and troubleshooting.
Signals
- GitHub stars
- 45
- Forks
- 4
- Last commit
- Aug 2026
Advanced
- Catalog kind
- skill
- Gateway key
xcode-ui-test-stabilizer- Source
- github.com/xopoko/build-swift-apps