[Calabash] Android settings on Mac

上午10:58

[Android] 





1. Java installation – Install the latest version of JDK on your machine.
2. Ruby installation – Install the latest version of Ruby on your machine.
3. ADB make sure device is link on machine
adb devices
4. Run the following command to install the gem calabash-android on your system:
gem install calabash-android
5. Run the following command to install gem Cucumber, which will install the Cucumber framework:
gem install cucumber
6. By executing the following commands in command prompt field, you will generate the folder structure which will contain the feature file, step_definitions and the support directory:
calabash-android gen
7. Sign the apk file by executing the following command in the command prompt field. Enter a valid keystore location, password and alias after entering the following into the command field:
calabash-android setup
Setting the keystore
If sign is fail, there it is explained how to resgin the app. Use calabash-android setup and set the following:
- keystore location: ~/.android/debug.keystore 
- password: android 
- alias: androiddebugkey
8. Run Calabash-android with apk file
bundle exec calabash-android run <apk>
9. Run on real devices
ADB_DEVICE_ARG='$DEVICE_ID' calabash-android run <apk>


[Reference] 

Automate Apps using cucumber
1. https://www.built.io/blog/2014/12/automate-android-apps-using-cucumber/
2. https://developer.xamarin.com/guides/testcloud/calabash/working-with/testing-on-devices/
3. https://github.com/calabash/calabash-android/wiki/Running-Calabash-Android
4. https://awetest.zendesk.com/hc/en-us/articles/202545346-Writing-Executing-a-Simple-Calabash-Android-Test



Setting the keystone
https://github.com/calabash/calabash-android/wiki/Running-Calabash-Android

Gherkin syntax
https://github.com/cucumber/cucumber/wiki/Gherkin

Ruby DeBug
http://technicalpickles.com/posts/debugging-cucumber/

Sample Gherkin style
http://testmunk.readthedocs.org/en/latest/steps.html#touching

Calabash_cucumber library
http://www.rubydoc.info/gems/calabash-cucumber/Calabash/Cucumber/Core

You Might Also Like

0 意見