skip to content

In Appium, what does appium:avd name on Android, and what names an Apple simulator?

level: middleimportance: should knowfreq 50%

answer

  1. naming a target that is not running
  2. one key on Android, two on Apple
  3. avd carries the AVD definition name
  4. model plus runtime names a simulator

basics

~10 s

appium:avd names an Android Virtual Device by its AVD name and exists only on Android. Apple platforms have no counterpart key: a simulator is named by appium:deviceName plus appium:platformVersion.

solid answer

~40 s

Both platforms need a way to name a virtual target that exists on the host before anything is running, and they solve it with different keys. On Android, `appium:avd` carries the AVD's name — a host-side definition, which is why a name works where a serial would not yet exist. On Apple platforms there is no `appium:avd`; a simulator is named by `appium:deviceName` for the model and `appium:platformVersion` for the runtime, the same combination `simctl` uses. The shape is the same — a human-readable handle rather than an identity — but Android needs one key and Apple needs two, and the second one is not optional, since one model is usually installed against several runtimes. What either driver then does to bring that target up is a separate subject.

go deeper

for a junior

Be ready to say that appium:avd is Android's key for naming an Android Virtual Device, and that an Apple simulator takes appium:deviceName with appium:platformVersion instead. Do not mix the two lanes.

for a middle

Explain why a name is needed at all for a target that is not running, why Android manages with one key and Apple needs two, and why both are descriptions rather than identities.

for a senior

Show how you keep virtual-target naming unambiguous across a shared fleet, and how you spot the silent case where a second runtime turns a once-precise Apple simulator description into an ambiguous one.

for a principal

Own the convention for how virtual targets are named across teams, so the handles in a capability map stay meaningful as AVDs and simulator runtimes are added, renamed and retired on shared hosts.

Every fleet has targets that exist on the host before anything is running: an Android Virtual Device that is defined but not booted, a simulator that is installed but not launched. Naming one of those is a different problem from naming a device that is already attached, because there is no runtime identity yet to point at. Both platforms solve the problem, and they solve it with different keys and a different number of them. ## Android: one key, appium:avd `appium:avd` carries the name of an Android Virtual Device. That name is a host-side definition rather than a runtime identity, which is precisely why the key exists. `appium:udid` would need the serial adb reports, and a serial belongs to a target that is running; naming the AVD lets a request describe a target that does not exist yet as a running thing. `appium:avd` is Android's alone. There is no Apple counterpart to it, and writing it into an Apple lane names nothing. ## Apple platforms: a pair, and both halves matter An Apple simulator is named by two keys together: - `appium:deviceName` — the model. - `appium:platformVersion` — the runtime. The XCUITest driver reaches simulators through `simctl`, where a simulator is identified by exactly that combination, so the capability pair maps onto the platform's own model. Send the model alone and the request is under-specified, because one model is normally installed against several runtimes; which of them you get is then not something the request decided. ## The shape is the same, the surface is not | | Android emulator | Apple simulator | | --- | --- | --- | | key or keys | `appium:avd` | `appium:deviceName` with `appium:platformVersion` | | what the value describes | an AVD definition on the host | a model and a runtime | | number of keys required | one | two | | identity or description | description | description | Both are descriptions rather than identities, and that is the deeper point. A description is only as precise as the vocabulary it draws on. Two AVDs with different names are separable; two simulators of the same model on the same runtime are not separable by that pair, however the request is written. ## The dental-recall lanes 1. On the Android build machine, the dental-recall emulator lane sets `platformName`, `appium:automationName` and `appium:avd`, naming the AVD that carries the seeded appointment data. 2. On the Mac, the simulator lane sets `platformName`, `appium:automationName`, `appium:deviceName` for the model and `appium:platformVersion` for the runtime. 3. Neither lane can borrow the other's key. Putting `appium:avd` into the Apple lane names nothing; putting `appium:deviceName` alone into the Android lane names nothing either, since that key does not select there. ## When the wrong key is sent - An Apple lane carrying `appium:avd` has not named a simulator, and whatever runs is not the target the author had in mind. - An Android lane carrying `appium:deviceName` instead of `appium:avd` looks correct, reads correctly, and selects on neither key. - An Apple lane carrying `appium:deviceName` without `appium:platformVersion` becomes ambiguous the moment a second runtime is installed on that Mac — which happens routinely, and silently. - A run whose target key was wrong still produces results, which is why this class of mistake is usually found long after it is made. ## What these keys do not decide - They do not decide how the virtual target is brought up, what arguments it starts with, or how long the run waits for it. Those are separate capabilities and a separate subject. - They do not decide which models and runtimes the suite ought to cover; that is a coverage decision rather than a capability. - They do not, on Android, make `appium:deviceName` meaningful. Adding `appium:avd` beside it does not promote the other key; it takes over the job that key looked like it was doing. ## The mechanic worth being able to explain Ask why Android needs a dedicated key and Apple does not, and the answer is about where the definition lives. Android's virtual targets are named artefacts on the host, each with a name of its own, so a single name is a complete handle. Apple's simulators are enumerated as a model crossed with a runtime, so a complete handle takes two values. Neither is better; they are two vocabularies, and a capability map has to speak the right one per lane. That is the level of answer a middle-tier interview is after: not only which key goes where, but why the key count differs, and what the difference costs when a run has to be pinned to one virtual target and proved to have gone there.

  • Why can an Android emulator be named by appium:avd when a real handset cannot?
    Because an AVD is a definition on the host, so it has a name whether or not anything is running. A real handset has no such definition — it is named by the serial adb reports for it, through `appium:udid`. One key describes a host-side artefact, the other identifies a live target.
  • What breaks first if an Apple simulator lane sends appium:deviceName but no appium:platformVersion?
    Nothing, until a second runtime is installed for that model. From then on the request describes more than one simulator, and which one runs is no longer something the capability map decided. The failure is silent, so it usually surfaces as an unexplained behaviour difference rather than as an error.

saying these in an interview costs you the question

  • Thinks appium:avd names an Apple simulator too
  • Gives an Apple simulator a model name and no platformVersion
  • Expects an AVD name to work as an appium:udid value
  • Believes an emulator can only ever be addressed by serial
  • Treats appium:avd as the key that configures how the emulator starts