Calabash support added in Testdroid Cloud – How to start using it?

Bitbar, the mobile devops company. Logo, large

We’re very excited to announce that we’ve added Calabash support for Testdroid Cloud today. If you are interested to start using it, please contact us and we’ll be happy to enable it for you. Please contact us at sales@bitbar.com.

Here are some basic details of Calabash and how to use it in Testdroid.

Have fun!

Calabash

How to access Calabash for Android?

https://github.com/calabash/calabash-android

Installation

https://github.com/calabash/calabash-android/blob/master/documentation/installation.md

$ sudo gem install calabash-android

Now you should have command calabash-android in your path.

New test

$ mkdir new-calabash-test

$ cd new-calabash-test

$ calabash-android gen

Now you should have features-directory inside new-calabash-test directory.

Features directory contains my_first.feature-file, step_definitions-directory and support-directory. For simple test you only need to edit my_first.feature-file.

Here is the list of predefined steps required: https://github.com/calabash/calabash-android/blob/master/ruby-gem/lib/calabash-android/canned_steps.md

Run your first test

Here is an example of the first test for Calabash:

 Feature: Click items

  Scenario: Run whole app

   When I press view with id "radio0"

   Then I wait

   Then I press view with id "radio1"

   Then I wait

   Then I press view with id "radio2"

   Then I take a screenshot

   Then I wait

   Then I enter text "Hello Calabash" into field with id "editText1"

   Then I take a screenshot

   Then I wait

   Then I press view with id "button1"

   Then I wait

   Then I take a screenshot

   Then I go back

   Then I wait

   Then I press view with id "radio1"

   Then I wait

   Then I press view with id "button1"

   Then I wait

   Then I take a screenshot

NOTE: Calabash requires that the application has INTERNET permission in the AndroidManifest.xml

If the application is not yet signed you can do it with Calabash:

$ calabash-android resign {path-to-apk}

Now you should be ready to run Calabash test locally

Go to new-calabash-test-directory and run:

$ calabash-android run {path-to-apk}

Output should look something like this:

 Feature: Click items

  Scenario: Run whole app # features/my_first.feature:3

   2485 KB/s (554161 bytes in 0.217s)

   2282 KB/s (100963 bytes in 0.043s)

   When I press view with id "radio0" # calabash-android-0.4.14/lib/calabash-android/steps/press_button_steps.rb:13

   Then I wait # calabash-android-0.4.14/lib/calabash-android/steps/progress_steps.rb:5

   Then I press view with id "radio1" # calabash-android-0.4.14/lib/calabash-android/steps/press_button_steps.rb:13

   Then I wait # calabash-android-0.4.14/lib/calabash-android/steps/progress_steps.rb:5

   Then I press view with id "radio2" # calabash-android-0.4.14/lib/calabash-android/steps/press_button_steps.rb:13

   Then I take a screenshot # calabash-android-0.4.14/lib/calabash-android/steps/screenshot_steps.rb:9

   Then I wait # calabash-android-0.4.14/lib/calabash-android/steps/progress_steps.rb:5

   Then I enter text "Hello Calabash" into field with id "editText1" # calabash-android-0.4.14/lib/calabash-android/steps/enter_text_steps.rb:25

   Then I take a screenshot # calabash-android-0.4.14/lib/calabash-android/steps/screenshot_steps.rb:9

   Then I wait # calabash-android-0.4.14/lib/calabash-android/steps/progress_steps.rb:5

   Then I press view with id "button1" # calabash-android-0.4.14/lib/calabash-android/steps/press_button_steps.rb:13

   Then I wait # calabash-android-0.4.14/lib/calabash-android/steps/progress_steps.rb:5

   Then I take a screenshot # calabash-android-0.4.14/lib/calabash-android/steps/screenshot_steps.rb:9

   Then I go back # calabash-android-0.4.14/lib/calabash-android/steps/navigation_steps.rb:1

   Then I wait # calabash-android-0.4.14/lib/calabash-android/steps/progress_steps.rb:5

   Then I press view with id "radio1" # calabash-android-0.4.14/lib/calabash-android/steps/press_button_steps.rb:13

   Then I wait # calabash-android-0.4.14/lib/calabash-android/steps/progress_steps.rb:5

   Then I press view with id "button1" # calabash-android-0.4.14/lib/calabash-android/steps/press_button_steps.rb:13

   Then I wait # calabash-android-0.4.14/lib/calabash-android/steps/progress_steps.rb:5

   Then I take a screenshot # calabash-android-0.4.14/lib/calabash-android/steps/screenshot_steps.rb:9

   1 scenario (1 passed)

   20 steps (20 passed)

   0m47.002s

If you have taken screenshots in your test there should be png-files in new-calabash-test-directory.

Run Calabash Android test in Testdroid Cloud

Access to Testdroid Cloud at https://cloud.testdroid.com/

After login, please follow the next steps to get your Calabash tests up and running on over 250 Android devices:

  1. Login to Testdroid Cloud
  2. Create a new projectSelection
  3. Upload your application (.APK)Upload
  4. Create zip-package from your features-directory
  5. Upload test zip-packageUpload your test
  6. Check advanced configurationsAdvanced configs
  7. Run the project
  8. Check out results

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close