Basic Calabash Setup - Hipolyto/ionic-calabash GitHub Wiki
After you have verified that the environment is properly configured, we can move to generate a basic file structure for your first Calabash test.
Create a temp directory for both Calabash Android and iOS tests
''' $ mkdir calabash-test-android $ cd calabash-test-android $ calabash-android gen ... $ cd .. $ mkdir calabash-test-ios $ cd calabash-test-ios $ calabash-ios gen '''
You’ll be asked few questions, plus to press enter, and as a result the following folder structure should have been created
Sample folder structure
Files Automatically generated
Calabash for Android generates you my_first.feature file that is an example of a Calabash feature:
Feature: Login feature
Scenario: As a valid user I can log into my app
When I press "Login"
Then I see "Welcome to coolest app ever"
The feature describes a basic behavior (scenario) or several of them in readable and easy to understand language.
The iOS example includes more details on Steps. Cucumber language does not distinguish between these keywords or *. These steps usually begin with one of the keywords: Given, When, Then, And, and But, however, they don’t have to, they can use * in place of those keywords.
Feature: Sample Feature
Scenario: Sample Scenario
Given the app has launched
And I have done a specific thing
When I do something
Then something should happen
keywords:
Given(/^the app has launched$/) do
wait_for do
!query("*").empty?
end
end
Documentation
Vim
# Some examples of various styles:
vim: syntax=java
vim: set syntax=ruby:
vim: set filetype=prolog:
vim: set ft=cpp:
Contributing
Please check out our contributing guidelines.