E2E Testing
Desktop E2E tests use WebDriverIO (WDIO) to drive the Tauri app via two automation backends:
| Platform | Driver | Port | App Format | Selectors |
|---|---|---|---|---|
| Linux / CEF | tauri-driver | 4444 | Debug binary | CSS / DOM |
| macOS / Appium | Appium Mac2 | 4723 | .app bundle | XPath / Accessibility |
Quick Start
macOS / Appium
# Install Appium + Mac2 driver (one-time, needs Node 24+)
npm install -g appium
appium driver install mac2
# Build .app bundle
pnpm --filter openhuman-app test:e2e:build
# Run all flows
pnpm --filter openhuman-app test:e2e:all:flows
Docker on macOS
# Build + run all E2E flows
docker compose -f e2e/docker-compose.yml run --rm e2e
# Run single spec
docker compose -f e2e/docker-compose.yml run --rm e2e \
bash app/scripts/e2e-run-spec.sh test/e2e/specs/smoke.spec.ts smoke
Environment Variables
| Variable | Default | Description |
|---|---|---|
TAURI_DRIVER_PORT | 4444 | tauri-driver WebDriver port |
APPIUM_PORT | 4723 | Appium server port |
E2E_MOCK_PORT | 18473 | Mock backend server port |
OPENHUMAN_WORKSPACE | (temp dir) | App workspace directory |
Element Helpers
app/test/e2e/helpers/element-helpers.ts provides a unified API:
| Helper | Description |
|---|---|
waitForText(text) | Wait for text to appear |
waitForButton(text) | Wait for button to appear |
clickNativeButton(text) | Click native button |
clickToggle() | Click toggle |
waitForWebView() | Wait for WebView ready |
Stable Test IDs
Use stable data-testid hooks:
cron-jobs-panel,cron-refreshsettings-nav-<routeId>onboarding-next-button
CI Workflow
Push / PR Checks
The default test.yml workflow runs frontend unit tests and Rust checks. The Linux tauri-driver E2E job is disabled because WebKitWebDriver cannot drive CEF-backed WebViews.
macOS / Appium
macOS/Appium is the currently supported automation backend for CEF desktop apps:
- Install Appium + Mac2 driver
- Build
.appbundle - Run all E2E flows
Troubleshooting
Linux: "WebView not ready" Timeout
For the default CEF runtime, this means the unsupported Linux tauri-driver path is trying to drive a CEF-backed WebView via WebKitWebDriver. Use macOS/Appium.
macOS: Deep Links Don't Work in tauri dev
Deep links require the .app bundle. Use pnpm tauri build --debug --bundles app.
Agent Observability Artifact Flow
bash app/scripts/e2e-agent-review.sh
Artifacts are at app/test/e2e/artifacts/<timestamp>-agent-review/.
Next Steps
- Testing Strategy - Testing hierarchy
- Release Policy - Release cadence