Company
Date Published
Author
Shashikant Jagtap
Word count
1153
Language
English
Hacker News points
None

Summary

The combination of Cucumber and Appium can be used for automating iOS apps in the cloud using Sauce Labs. To get started, developers need to have a Mac OSX 10.7.4 or higher with Xcode installed, their app source code or a prebuilt .app bundle, and a Saucelabs username and API key. The Appium server needs to be set up by downloading the `Mac OSX Appium.dmg` package or running it from source, authorizing use of the iOS Simulator, and compiling and uploading the iOS app on Sauce Labs using optional parameters like `TARGET_DEVICE_FAMILY`. Cucumber is used for writing tests in a behavior-driven development format, with features, step definitions, and support code. The `sauce_capabilities` function is used to define the desired capabilities for the test, and the `sauce_url` function returns the URL for the Sauce Labs remote WebDriver instance. The `sauce` object is created using the `Selenium::WebDriver.for(:remote, :desired_capabilities => sauce_capabilities, :url => sauce_url)`. Step definitions are written in a separate file and implemented using Selenium-Webdriver JSON Wire Protocol for Appium. Once all steps are defined, Cucumber can be run to execute tests on Sauce Labs, with the ability to view video and screenshots of the job.