Android Test Automation with Cucumber and Calabash
In my previous post I explained the Cucumber Capybara and Calabash and behaviour driven development. In this post I want to explain how we can implement and run cucumber and calabash for automating test cases for android applications. If you have not set-up your environment yet, you can read this post. You should also have an android virtual devices or a real devices that is connected to your computer in debugging mode. Your android version should be higher than 2.2. If your system is ready for testing, you can clone the repository that I created for mobile test automation purposes. Sure, it may be more sophisticated if a real android developer develop something but from this application you can have a fresh starting.
git clone https://github.com/gunesmes/calabash_android_automation.git
You can check the images on the github so that get information what the application is looking like. Just open the project file and look at the two important files in feature directory: calabash_step.rb in step definition and my_first.feature, as the following files.
Finally, run the following command to execute test cases, you can see result as in the picture below:
calabash-android run sampleAndroidProjectToAutomate.apk