●Cucumber is the world’s most popular open
source BDD tool and it’s completely free
●Cucumber lets you express the behavior of
your app using natural language that can be
understood by business experts and non-
Behavior Driven Development
●BDD emerged from TDD
●It is an approach to Unit Testing and
Acceptance Testing dealing with how they
●Acceptance tests should be written using
standard AGILE framework of a User Story:
●Acceptance Criteria should be written in
terms of scenarios and implemented as
classes: Given - When - Then
Back to our pickles...
●Being based on Cucumber, Calabash uses
Gherkin, a BDD language that 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.
What can the pickles do?
Each action can be:
●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
●Screenshots: screendump the current view
on the current device model
How does it work?
●When a Calabash test is executed both your
local computer and a device is involved.
●The device might be an emulator or an
actual physical device.
What does it need?
●Features: The feature files describe the
user-stories you want to test. One or more
features can be tested in one run.
●Step Definitions: Calabash comes with a
set of predefined step which you can find
●These steps are generic and made to get
you up and running fast.
● Sometimes, just writing steps in Gherkin language is
not enough. In that case, scripts are created for the
necessary steps to be successfully run. By default,
Ruby is the language of choice.
●Your app: you don’t have to make
modifications to your app before testing it but
for more complex scenarios where scripts
are required for the successful interpretation
of the steps it is good practice to have some
helper tags in the code.
●Instrumentation Test Server: This is
another app that will be installed and
executed on the device. It is automatically
generated and pushed to the device by the
●It provides communication between the
Calabash framework and the app that needs
to be tested.