Showing posts with label Calabash. Show all posts
Showing posts with label Calabash. Show all posts

Execution of Calabash test on multiple Simulator

In this post I have run below calabash android scenario in two simulator

Feature: Login feature

  Scenario: As a valid user I can log into my app
    When I press "Login"
    And click on web menu
    And enter into input field
    And enter into text area
    And click on Radio button B
    And click on check boxes
    And click on go button
    And set second device
    And click on web menu
    And enter into input field
    And shut down test server
    And set first device
    And click on web menu
    And enter into input field 

Road to automate webview using Calabash

Calabash only supports web view which is in build in mobile application and not supported web application opened on mobile browser. I have searched such type application and finally got from MonketTalk sample application. In this I have created step definition and automated below form:

Road to identifying elements using Calabash's query command

In this post, I will show you the way, how to identify application elements. Before going below, make sure you resigned and created test server of your application.
Now open commands prompt, go to directory application and run below command:
 calabash-android console {ApkfileName} 
Calabash console should be opened. Following are the some basic way to find element details using query commands.

Calabash android predefined steps.

Calabash android has some predefined steps, you don’t need to define these steps in your steps definition ruby file. Just call these functions in your  feature file by passing valid argument.

Assertion steps:
Following are the some steps definition for the assertion

Then /^I see the text "([^\"]*)"$/  

Then /^I see "([^\"]*)"$/

Then /^I should see "([^\"]*)"$/ do

Then /^I should see text containing "([^\"]*)"$/ do

Then /^I should not see "([^\"]*)"$/ do

Then /^I don't see the text "([^\"]*)"$/ do

Then /^the view with id "([^\"]*)" should have property "([^\"]*)" = "([^\"]*)"$/ do

Then /^the "([^\"]*)" activity should be open$/ do

Road to integration of calabash android test with Jenkins

In this post I am going to show you how to integrate calabash android test with Jenkins continuous integration for build. Also I will show you how to publish cucumber execution report in Jenkins.

1. Java: java should be installed
2. Jenkins: If you are new to Jenkins then click link "click here” of my post how to setup Jenkins in window before continue.
3. Install the”cucumber-jvm-reports-java” plugin: following are the steps to install plugin.

Road to create and execute Calabash Android test for beginner

In my previous post I have written how to setup calabash android and how to find element locator details using calabash console. In this post I will show you how to create calabash android test. Also I will show you, how to generate report.

Steps to write scenario:
After running command >> calabash-android gen   calabash-android automatically generates cucumber skeleton folder-structure. Now you write cucumber test scenario for your application test scenario into created “my_first.feature” file as written below:

Road to Calabash Android automation setup

Calabash is open source, cross-platform automation tool, supporting Android and iOS based native application.

Ruby Installation: download ruby version greater than 1.8.7 and less than 2.0 from link “”. Install downloaded ruby setup file into your machine.

Android SDK: download and install android sdk from link: “” for more details how to setup and install Android SDK visit link “”.
After installation, setup “ANDROID-HOME” path in your system’s environment variable.
Click link "more detail" how to create android virtual device.