What Are "Atomic Capabilities"?

An atomic capability is the smallest indivisible operation unit—like atomic operations in programming: either fully completes or fully fails, never enters a half-finished state.

In iDeviceFarm, atomic capabilities are invoked directly by the Agent client on each phone. The farm controller only dispatches commands and collects results. This separation provides decoupling: regardless of what model or strategy sits above, bottom-line execution remains consistent and verifiable.

Capability Breakdown

CapabilityWhat It DoesSuccess Receipt
launch_appLaunch a specified appTarget app is in foreground
tapTap a coordinate or UI selectorTap sent; optional UI change confirmation
swipeSwipe gesture (up/down/left/right)Gesture completed
inputEnter text into a target fieldField text matches expectation or is readable
wait_uiWait for text or element to appearExplicit failure if timeout reached
album_import / pick_mediaImport/select a media fileResource selectable on publish page
screenshot (optional)Capture current screenOnly enabled during debugging; disabled by default, never persisted

Core Design Principles

Atomic Actions vs. Record-and-Playback Scripts

Many people confuse atomic capabilities with "record and playback." The difference is significant:

DimensionRecord & PlaybackAtomic Actions + AI
StabilityBreaks on app redesignReads actual screen content; resistant to updates
FlexibilityCan only replay recorded flowAI dynamically composes from intent
Error handlingRestart from beginning on failurePinpoint failing step, retry just that step
Use caseFixed-flow testingVariable-length flows (user freely describes tasks)

Bottom line: atomic capabilities are the foundation of the entire system. Solid foundations mean elaborate upper designs don't collapse. Curious how atoms chain into workflows? Read our capabilities deep dive.