Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Calabash my understanding


Published on

Calabash based on Cucumber makes your mobile application testing an easy job!

Published in: Technology, Self Improvement
  • Be the first to comment

  • Be the first to like this

Calabash my understanding

  1. 1. CALABASH –A Functional Testing Tool for Android and iOSWhat is Calabash: Calabash is an open source functional testing tool for Androidand iOS mobile apps developed by LessPainful. Its based on Cucumber.Calabash contains two low level libraries:1) Calabash iOS2) Calabash AndroidThese two libraries enable Cucumber tool to automate the test cases in very easyunderstandable language.One sample test case is written below:Feature: Rating a standScenario: Find and rate a stand from the listGiven I am on the ListThen I should see a "rating" buttonAnd I should not see "Dixie Burger & Gumbo Soup"And take pictureThen I touch the "rating" buttonAnd I should see "Dixie Burger & Gumbo Soup"And take pictureWhen I touch "Dixie Burger & Gumbo Soup"Then I should see details for "Dixie Burger & Gumbo Soup"When I touch the "rate_it" buttonThen I should see the rating panelThen I touch "star5"And I touch "rate"And take pictureThis test specification file is called feature file in Calabash and Cucumber. Thisfeature file describes the intended behavior of the app. Each line after Scenario iscalled step.In Calabash a step does one of three actions:
  2. 2. 1) Makes a User action( e.g. touch, swipe, scroll etc)2) Makes an assertion (e.g. I touch the button, I should see details etc)3) Takes screen shots.Overview of Calabash:1) Calabash – iOS: It consists of two parts----a) Client library written in Rubyb) Calabash.framework, a server framework written in Objective – CTo use Calabash we make an special test target in XCode that links withcalabash.framework. The server framework starts HTTP server inside theapp that listens to requests from the client library.The Cucumber tool executes the feature file that represents the intendedbehavior of the App under test. The feature file contains steps either inpredefined or custom (user defined) step definitions.Below is the illustration:
  3. 3. 2) Calabash- Android: The set up illustration for Calabash- Android looks likethis:Features: The feature file is written in Cucumber and it describes the userstories we want to test. In other words it contains the steps for intendedbehavior of the app.Step Definitions: Calabash Android comes with a set of predefined stepsthat allows us to run the test faster and it also has the facility of providingthe custom (user defined) steps.We don’t need to make any modifications to our app before we test it.Intrumentation Test Server: This is another app that will be installed andexecuted into the device. This app is based onActivityInstrumentationTestCase2 from the Android SDK. It is generated bythe Android Calabash framework.
  4. 4. In features file we can add either predefined steps given by LessPainful if thosesatisfy our app intended behavior or can go after customized steps.Predefined steps are separately available for Calabash iOS and Calabash Androidbased on Cucumber.Calabash has got advantage over other existing performance testing tools for itbeing easy to be implemented with its Cucumber behavioral steps in features file.Prepared by : Farhan Sumbul, CoConnect.