For Automated Testing we usually here Calabash & Cucumber, sometimes it has 2 parts:
Cucumber is the testing tool, we use it to write test code. While Calabash is the testing framework, which allows us to interact with apps.
So Calabash or Appium would run Cucumber test codes on simulators, emulators, or browsers… This blog guides me how to setup Calabash & Cucumber.
Cucumber tests are written in domain-specific language that is readable for everyone.
Short intros of the frameworks:
- Calabash is cross-platform, supporting Android and iOS.(open-source, free, but is supported by Xamarin.)
- Calabash only supports Ruby.
- Calabash libraries allow test-code to interact (programmatically) with app (native & hybrid).
- Actions that Calabash supports:
- Gestures: tap, swipe, rotate
- Assertions: there should be a ‘Login’ button, or web view has 1 element with text “Hello”
- Screenshots: take screenshot of current screen
- Calabash supports Cucumber – Cucumber is easy to understand for normal people.
- Appium uses Webdriver
- First, install NodeJs & Appium
- Second, use xctool -sdk to build app for iOS Simulator.~/xctool-0.2.1/xctool.sh -workspace EatNow.xcworkspace/ -scheme EatNow -sdk iphonesimulator -destination platform=’iOS Simulator’,OS=8.0,name=’iPhone Retina (3.5-inch)’ -destination-timeout 120 test -freshSimulator