Skip to content

Latest commit

 

History

History
47 lines (35 loc) · 2.39 KB

README.md

File metadata and controls

47 lines (35 loc) · 2.39 KB

Hammer documentation

Hammer simulates real touch, stylus and keyboard events on iOS. Use it to write unit tests that interact with your UI like a user, or to drive a running app from the command line and AI agents.

Writing tests

  1. Getting started: install Hammer and write your first test.
  2. Touches: fingers, gestures and stylus.
  3. Keyboard: typing and key presses.
  4. Finding views: identifiers, queries and SwiftUI.
  5. Waiting: waiting for the app, finishing and settings.
  6. Swift Testing
  7. Upgrading from 1.x
  8. Troubleshooting

Driving a running app

Add the agent to your app:

  1. Getting started: start the agent in a debug build.
  2. Security: tokens, physical devices and remote connections.
  3. Custom commands: add commands for your app.

Or add it to an Android app:

  1. Getting started: one line of Gradle for debug builds.
  2. Security: who can connect, release builds and physical devices.
  3. Custom commands: add commands for your app.

Then use the hammer command line tool:

  1. Getting started: install hammer and run your first commands.
  2. Targeting elements: refs, identifiers, labels and points.
  3. Live editing: try view changes in the running app.
  4. System UI: tap permission alerts and the home screen in the simulator.
  5. MCP server: give AI agents the commands as tools.
  6. Android: drive an Android app through adb.
  7. Errors: error codes and exit codes.
  8. Commands: every built-in command.

Developing Hammer