Desired capabilities are a set of keys and values (i.e., a map or hash) sent to the Appium server to tell the server what kind of automation session we’re interested in starting up.

We define our settings on desired capabilities. For running on iOS mobile testing using appium, at least you have to set :

iOS Simulator

DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(“platformVersion”, “8.3”);
capabilities.setCapability(“deviceName”, “iPhone 6”);
capabilities.setCapability(“app”, appFile.getAbsolutePath());

iOS Real Device

DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(“platformVersion”, “8.3”);
capabilities.setCapability(“deviceName”, “iPhone 6”); // your device name
capabilities.setCapability(“bundleId”, “io.appium.TestApp”);
capabilities.setCapability(“udid”, “1ae203187fc012g”);

Capability Description Values
platformName Which mobile OS platform to use iOS, Android, or FirefoxOS
platformVersion Mobile OS version e.g., 7.1, 4.4
deviceName The absolute local path or remote http URL to an .ipa or .apk file, or a .zip containing one of these. Appium will attempt to install this app binary on the appropriate device first. Note that this capability is not required for Android if you specify appPackage and appActivity capabilities (see below). Incompatible with browserName. /abs/path/to/my.apk or http://myapp.com/app.ipa
bundleId Bundle ID of the app under test. Useful for starting an app on a real device or for using other caps which require the bundle ID during test startup. To run a test on a real device using the bundle ID, you may omit the ‘app’ capability, but you must provide ‘udid’. e.g. io.appium.TestApp
udid Unique device identifier of the connected physical device e.g. 1ae203187fc012g

credit :
[1] https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/caps.md
[2] http://appium.io/slate/en/master/?ruby#appium-concepts

 

Leave a Reply

Your email address will not be published. Required fields are marked *

Set your Twitter account name in your settings to use the TwitterBar Section.