I am confusing. How to develop test strategy with calabash android for android native app. Anyone help and give me simple demo?

1 Answer 1


Official general workflow for writing Calabash-driven tests is as follows:

  1. Write the feature

    As described in the overview, the developer and a subject matter expert work together to write the Calabash feature. They create a .feature file that describes how the scenarios should work.

  2. Run the feature

    Next, the developer runs the feature that was created. It will fail because the steps have not yet been defined. However, Cucumber will help us out by providing some code snippets that we can use to create the step definitions.

  3. Create the Step Definitions

    Using the snippets that Cucumber provided in step #2, we create a Ruby source code file, and paste the snippet output into it.

  4. Explore the Application using the Calabash Console

    Not strictly necessary, this step involves starting up an instance of the Calabash console. The Calabash console is a command line utility that allows us to issue commands to the Calabash test server communicating with our app. We can use this to discover the Calabash queries necessary to interact with the UI object in the application.

  5. Update Step Definitions

    Once we have figured out the Calabash queries for locating and manipulating the UI object, we can use these - along with the Calabash API - to implement the step definitions.

  6. Run the Feature

    When the step definitions are finished, we can run the features. If this is a brownfield application, the functionality has already been coded and the tests should all pass. If this is a greenfield project, the tests will not pass as there is no application code – we will move on to step #7 below.

  7. Implement the Feature in the Application

    This step is only necessary in a greenfield project. The developer will shift attention to the application and write the code to implement the desired functionality, and make the test pass.

  8. Repeat

    Once the feature is implemented with a passing test, it is done. Time to move on and implement the next bit of functionality in the application.

More info and detailed example can be found here.

Also best practice is to use Page Object approach when defining screens.

Here is good example on this:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.