Haiku

iOS

Plain-English UI tests for iOS apps. .ios.haiku files compile to a .sim action sequence and run on the iOS Simulator via XCUITest.

Status: available

.ios.haiku files describe an iOS UI flow in plain English. Haiku compiles them to a .sim action sequence and runs them on the iOS Simulator using a bundled XCUITest driver built against your installed Xcode.

Requirements

  • macOS, Apple Silicon
  • Xcode (any version that supports your target iOS simulators)
  • At least one installed simulator runtime (run xcrun simctl list devices to check)

The first time you run an .ios.haiku spec, Haiku builds the XCUITest driver from source against your Xcode and caches the result. Subsequent launches are instant.

Filename

<base>.ios.haiku — e.g. login.ios.haiku, checkout.ios.haiku.

Frontmatter

---
intent: Verify a user can launch Maps and search for a landmark
tags: [smoke, maps]
target:
  bundle_id: com.apple.Maps
  device: iPhone 17
---
FieldRequiredNotes
intentyesOne-line description
target.bundle_idyesReverse-DNS bundle identifier of the app to test
target.deviceyesInstalled simulator name (e.g. iPhone 17, iPad Pro (M4))
target.verifynoOptional natural-language final assertion

The simulator is pinned in the spec, not on the command line. There is no --device flag at the CLI — a .ios.haiku file should produce the same result on any machine that has the named simulator installed.

Body

One natural-English step per line. See the Actions reference for the full vocabulary the compiler understands today.

Launch the app
Tap the search bar
Type "Statue of Liberty"
Verify the search result appears

Running

haiku recite login.ios.haiku

Haiku compiles to login.ios.sim on first run, caches the result, and executes against the named simulator. The simulator is booted automatically if it isn't running.

Recording from a live session

haiku record <bundle-id> watches a live simulator session and writes a .ios.haiku file from it.

haiku record com.apple.Maps -o maps-search.ios.haiku
haiku record "iPhone 17 Pro com.apple.Maps" -o maps-search.ios.haiku

On this page