Traditionally, in order to test both Android and iOS apps, we need to:
- Create a test case document.
- Translate the test document to automation scripts for Android and iOS.
As a result, we need to maintain 1 document and 2 scripts for each user story. But now, there is a less painful way. All we need is to create a Cucumber test for each user story like the follow:
Feature: Rating a stand
Scenario: Find and rate a stand from the list
Given I am on the List
Then I should see a "rating" button
And I should not see "Dixie Burger & Gumbo Soup"
And take picture
Then I touch the "rating" button
And I should see "Dixie Burger & Gumbo Soup"
And take picture
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
Then I touch "star5"
And I touch "rate"
And take picture
And the script can drive both Android & iOS apps. Since the test script is more readable then Robotium or UI Automation scripts, so the PO or tester can understand and modify it by themselves. We create and maintain only 1 document instead of 3.
Overall, Calabash is a more cost effective tool to express executable specification on Android and iOS platform.