We at Perfecto Mobile continues to innovate and provide a variety of commercial and open source tools for mobile app developers and testers so they can continuously develop, test and deploy mobile apps with confidence. We’re happy to announce added support for Calabash – the latest integration to our open source portfolio. With the new integration Perfecto Mobile’s users can develop Calabash tests in the form of Features, Scenario’s and step-definitions and execute them in a governed cloud of real mobile devices using the leading CI (continuous Integration) servers such as Jenkins, CloudBees, TeamCity and TFS.
Behavior driven development (BDD) is a modern quality assurance technique which aims to reduce TTM and enhance quality for mobile and non-mobile apps for iOS and Android. In the past we used the terms Test Driven Development (TDD) or Extreme Programming (XP) which aimed toward the same goal of developing your module in parallel with testing it in a rapid way.
Behavior Driven Development follows outside-in development, in which the application code is written after its 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; instead of creating tests that describe the shape of APIs, application behaviors are specified.
Recently, and especially in mobile where a need to shift quality activities earlier in the development lifecycle to meet continuous integration goals, BDD has become a standard method of agile software development. Cucumber and Calabash tools are using Ruby as their development language (also Java and ObjectiveC are supported).
Calabash is a mobile open source solution which is an extension of Cucumber.
Typically the flow of developing a Cucumber or a Calabash test case will consist of the below steps as shown in Figure 1. The advantage of such technology is the ease of writing software readable specification together with the development of your tests for high quality. In a simple statement developers iteratively translate use cases into test code during app development
As shown in Figure 1, users start by specifying their business application features (e.g. Login to an application or math calculation like Addition as shown above) in a readable language. The next step is to write the use cases in a similar way, that are enabled by your application’s features. Than the following step is to develop the step definition in Ruby (or Java) and to have Cucumber execute when it passes over the BDD text description.
As you can see in Figure 2, below, using the Calabash declarative query syntax, users can identify real OS level objects and perform the actions and use cases as seen above in an easy way on native and hybrid mobile apps. Calabash enables query for labels, web elements, text boxes and any other objects within native and web/hybrid apps. In the specific example below there is a simple way of entering text to a mobile native apps using setText option and then press Login using the Touch function.
Figure 2: Perfecto Mobile Android App object analysis achieved using Calabash