Calabash Quick Start for XCode
Let us know how you feel about this.
last updated: 2016-10
In this quick start we'll add a Calabash feature to an iOS application created in Xcode 8 and run the test locally and in Xamarin Test Cloud. The test will confirm that the application will display the correct error message when the user enters a credit card number that is too short or too long.
Conceptually, the test will consist of the following steps:
- Wait for the View Controller to load – Typically a view controller is quick to load, but to be safe the test will verify that the correct view controller has loaded.
- Enter 15 digits for the credit card number – The test must simulate data entry.
- Tap the
Validate Credit Cardbutton – Simulate what a user would do to call the validation logic.
- Confirm the Error Message – Finally, the test should assert the application has displayed the correct error message.
The following screenshot is a sample of the running iOS application:
There is a lot to cover in this guide, which will be broken up into the following sections:
- Installing the Calabash Sandbox – discusses how to quickly get an environment setup using the Calabash Sandbox.
- Linking the Calabash Framework – covers how to download and link the Calabash framework to support testing the iOS application.
- Writing the First Test – Covers creating a simple and then running it locally in the iOS simulator.
- Creating a Xamarin Test Cloud Team and Test Run – In this section we will create a Team for this new application and select the iOS devices that our tests should run on.
- Running the Test in Xamarin Text Cloud – Finally, we will submit the test to Xamarin Test Cloud and run it on real devices in the cloud.
This quick start assumes that you already have your Mac configured for iOS application development, and that you are using XCode 8 or higher. You must also have your iOS signing certificates and distribution profiles for creating an IPA setup on your computer. How to do this is beyond the scope of this quick start.
Make sure you download the sample Xcode project and expand it.
A Test Cloud account is required if you wish to submit the tests to Xamarin. It is not necessary to have a Test Cloud account if you only wish to run the tests against the local iOS simulator.