Automate your Mobile application testing using Calabash tool

  • Delivering bug free and high quality product is the sole responsibility of quality assurance team. But when too much software applications are lined up for executing diverse test cases spotting the slightest errors becomes tedious.
  • Manual testing helps us to understand the minute intricacies of the software applications but when time factor is a  major concern automation testing is best suited . The results produced by automation testing are much more accurate.
  •  8686177_orig
  • Listed below are some of the few features of calabash,
  • Why calabash?
  • Despite of all the available testing why to go for calabash?
  • Calabash is an open source framework used for automation testing. Novice users ( people unfamiliar with programming languages like Python, JavaScript etc..) find it user friendly.
  • What is calabash?
  • Calabash is an automation tool used for both iOS and Android applications. Here the test scenarios are written in cucumber which has a script pattern much similar to plain conversation in English. Ruby is used for defining the statements. Statements defined once can be reused.
maxresdefault
  • Account sign in process using ruby and cucumber:
  • Feature: Calabash testing for Sign In
  • Scenario:

    • Sign in to an account
    • Given I am looking at Home page
    • Then I touch the Sign In Button
    • Then I wait for Sign In page to appear
    • Then I enter Sign In Email ID
    • Then I enter Sign In Password
    • Then I touch the “Submit ” text
    • Then I print Sign in successful
  • Ruby code:
  • Given(/^ I am looking at Home page $/) do
  • wait_for (:timeout >=60) {element_exists(“* id: ‘Home_header'”)}
  • end
  • Then(/^ I touch the Sign In Button $/)do
  • touch(query(“* id: ‘Sign In Button'”))
  • end
  • Then(/^ I wait for Sign In page to appear $/)do
  • wait_for(:timeout >=60) {element _exists(“* id: ‘signin_header'”)}
  • end
  • Then(/^ I enter Sign In Email ID $/)do
  • query(“* id:’emailaddresses'” ,{set Text=> ‘abc@gmail.com’})
  • end
  • Then(/^I enter Sign In Password $/)do
  • query(“* id:’password'”,{set Text =>123456})
  • end
    +
  • Then(/^ I print Sign in successful $/)do
  • puts ‘Sign in successful’
  • end
  • Observations:
  1. Cucumber file always start with feature keyword declared only once.
  2. Scenario indicates the start of the test case and can be used only once.
  3. Keywords like ‘Given,Then,When’ can be used multiple times.
  4. Calabash is case sensitive.
  5. Except predefined text structures all the statements in cucumber are defined in ruby.
  • Advantages:
  1. Lesser time consumption than manual testing.
  2. Use of only basic programming skills .
  3. Platform independent.
  4. There is no need for  external devices as it supports emulators.
  • Disadvantages:
  1. Lack of  editor or IDE.
  2. Language dependent (supports only Ruby).
  3. Minimum online assistance.
  • Conclusion:
  • Calabash is found to be more useful for function and regression testing resulting in the production of high quality software within a minimum time span.
  • For automating your mobile application testing, please drop an email to sales@veltrod.in

About Author

Madhumitha Srinivas

I am an avid reader. My ultimate goal is to convey complex information in a much more simple and interesting form.

For business enquiry, please contact us

TOP BLOGGER

© Copyright 2013 Veltrod Scroll Top