View
323
Download
2
Category
Preview:
Citation preview
Tools
Android iOS
Calabash Android Calabash iOS
MonkeyTalk Frank
Robotium UIAutomation
Selendroid KeepItFunctional
UIAutomator ios-driver
Which tool to choose?
The key factors
● Ruby on Rails server● Cross-platform support (Android, iOS)● framework updatability● running on real devices
Calabash. Adavantages.
● Calabash Android● Calabash iOS● Ruby● Gherkin Syntax (Cucumber style)● Calabash Android last updated - 26 days ago● Calabash iOS last updated - a month ago● Testing on the real devices
Calabash iOS. Installation
# Install calabash ios gem
$ gem install calabash-cucumber
# Generate a features dir
$ bundle exec calabash-ios gen
# Install calabash.framework to .xcodeproj
$ calabash-ios setup
calabash-ios setup
● Generates calabash scheme for iOS project.● Connects calabash.framework to our project (testing
server)
Runnig tests. iOS
To run on physical device:
● BUNDLE_ID=com.anadea.***● DEVICE_ENDPOINT=http://192.168.100.85:37265
The launch command:
$ bundle exec cucumber
Calabash Android. Installation
# Install calabash Android gem
$ gem install calabash-android
# Generate a features dir
$ bundle exec calabash-android gen
Duplicate ourselves
iOS
sign_up.feature
sign_up_steps.rb
sign_up_screen.rb
Android
sign_up.feature
sign_up_steps.rb
sign_up_screen.rb
What to do?
● install gems on the server side● split PageObject into moduls● stick together calabash-ios & calabash-android launchers
Modified scheme
iOS + Android
sign_up.feature
sign_up_steps.rb
ios
sign_up_screen.rb
android
sign_up_screen.rb
The launch commands
iOS
cucumber CLIENT_PLATFORM=IOS
Android
calabash-android run <path_to_apk> CLIENT_PLATFORM=Android
The advantages of implementation
● there is no duplicate code (*.feature, *_steps.rb)● possibility of easy access to objects via ActiveRecord● emulation of the second client working on the server side
The disadvantages of implementation
● different launch commands (cucumber, calabash-android run)● it is not possible to work in the debug mode, provided by calabash (remedy is
binding.pry :) )
Visit our blog for more great tips: anadea.info/blog
Recommended