Skip to main content

E2E Testing

Desktop E2E tests use WebDriverIO (WDIO) to drive the Tauri app via two automation backends:

PlatformDriverPortApp FormatSelectors
Linux / CEFtauri-driver4444Debug binaryCSS / DOM
macOS / AppiumAppium Mac24723.app bundleXPath / 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

VariableDefaultDescription
TAURI_DRIVER_PORT4444tauri-driver WebDriver port
APPIUM_PORT4723Appium server port
E2E_MOCK_PORT18473Mock backend server port
OPENHUMAN_WORKSPACE(temp dir)App workspace directory

Element Helpers

app/test/e2e/helpers/element-helpers.ts provides a unified API:

HelperDescription
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-refresh
  • settings-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:

  1. Install Appium + Mac2 driver
  2. Build .app bundle
  3. 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.

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