Introduction to Calabash¶
Calabash enables mobile app developers to write and execute automated acceptance tests for their apps. The basic concept of behavior-driven development (BDD) and all details of how to configure iOS and Android applications to use Calabash are described.
Calabash is a framework that enables Automated UI Acceptance Tests written in Cucumber to be run on iOS and Android applications. In a nutshell, Calabash works by enabling automatic UI interactions within an application such as pressing buttons, entering text, validating responses, etc. While this, in itself, is a great first step in Automated UI Acceptance Testing, the real utility of Calabash becomes obvious when it’s plugged into Bitbar Testing products. With Bitbar, Calabash tests can be configured to run on hundreds of different Android and iOS devices, providing real-time feedback and validation across many disparate form factors and OS versions.
Behavior Driven Development (BDD) is a philosophy of Outside-in Development in which the application code is written after it’s externalities have been defined. It’s conceptually similar to Test-Driven Development (and is in fact based on it), but takes it one step further, in that instead of creating tests that describe the shape of APIs, application behaviors are specified.
The essential idea here isn’t very different from the practice of creating functional specifications for software and then building to the spec, but it takes functional specifications and makes them executable, by providing a means in which to test the actual specifications. And just as typical with specification creation, BDD is meant to be a process in which multiple stakeholders weigh in to create a common understanding of what is to be built. The benefit of the BDD approach is that it helps ensure that the right software is built (as opposed to the software being built right). The intent is that the software is designed from the perspective of the business owner. That way, there is little interpretation required as to how the software should behave.