Calabash enables you to write and execute automated acceptance tests of mobile apps. Calabash is cross-platform, supporting Android and iOS native apps. It is open source and free, and has a company, LessPainful, backing and developing it.
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. Each action can be one of
- 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
Calabash could be compared to Selenium WebDriver. However, it is important to realize that interacting with a web app from a desktop computer is vastly different than interacting with a native app using a touch screen. Calabash provides APIs that are specialized to native apps running on touch screen devices.
Calabash supports Cucumber. Cucumber lets us express the behavior of our app using natural language that can be understood by business experts and non-technical QA staff. Here is an example.
Feature: Rating a stand
Scenario: Find and rate a stand from the list
Given I am on the foodstand list
Then I should see a "rating" button
And I should not see "Dixie Burger & Gumbo Soup"
When I touch the "rating" button
Then I should see "Dixie Burger & Gumbo Soup"
When I touch "Dixie Burger & Gumbo Soup"
Then I should see details for "Dixie Burger & Gumbo Soup"
When I touch the "rate_it" button
Then I should see the rating panel
When I touch "star5"
And I touch "rate"
Then "Dixie Burger & Gumbo Soup" should be rated 5 stars
Although we focus on Cucumber, Calabash can be used to write automated functional and acceptance tests using any Ruby-based test framework, and JVM-based languages will be supported too!
Calaba.sh for Android
Calabash Android is the automation library for Android.
or