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 Mobile Application Testing Overview


Published on

A short introduction to the Calabash mobile automation framework

Published in: Software
  • Be the first to comment

  • Be the first to like this

Calabash Mobile Application Testing Overview

  1. 1. Calabash
  2. 2. What is Calabash? ●Calabash is a functional testing tool for mobile apps ●It is based on Cucumber which means a Behavior-Driven Development (BDD) language is used to write the steps.
  3. 3. Cucumber?
  4. 4. Yes, Cucumber. ●Cucumber is the world’s most popular open source BDD tool and it’s completely free ●Cucumber lets you express the behavior of your app using natural language that can be understood by business experts and non- technical staff
  5. 5. Behavior Driven Development ●BDD emerged from TDD ●It is an approach to Unit Testing and Acceptance Testing dealing with how they are used. ●Acceptance tests should be written using standard AGILE framework of a User Story:
  6. 6. ●Acceptance Criteria should be written in terms of scenarios and implemented as classes: Given - When - Then ●Example:
  7. 7. Back to our pickles... ●Being based on Cucumber, Calabash uses Gherkin, a BDD language that it understands.
  8. 8. ●Calabash consists of libraries that enable test-code to programmatically interact with native and hybrid apps. The interaction consists of a number of end-user actions. What can the pickles do?
  9. 9. Each action can be: ●Gestures: Touches or gestures (e.g., tap, swipe and rotate). ●Assertions: For example: there should be a "Login" button or the web view should contain an "<h1>" element with the text "Hello". ●Screenshots: screendump the current view on the current device model
  10. 10. How does it work? ●When a Calabash test is executed both your local computer and a device is involved. ●The device might be an emulator or an actual physical device.
  11. 11. What does it need? ●Features: The feature files describe the user-stories you want to test. One or more features can be tested in one run. ●Example:
  12. 12. ●Step Definitions: Calabash comes with a set of predefined step which you can find here. ●These steps are generic and made to get you up and running fast.
  13. 13. ● Sometimes, just writing steps in Gherkin language is not enough. In that case, scripts are created for the necessary steps to be successfully run. By default, Ruby is the language of choice.
  14. 14. ●Your app: you don’t have to make modifications to your app before testing it but for more complex scenarios where scripts are required for the successful interpretation of the steps it is good practice to have some helper tags in the code.
  15. 15. ●Instrumentation Test Server: This is another app that will be installed and executed on the device. It is automatically generated and pushed to the device by the Calabash framework. ●It provides communication between the Calabash framework and the app that needs to be tested.
  16. 16. That’s all folks!