• Stars
    star
    1,809
  • Rank 25,671 (Top 0.6 %)
  • Language
    Ruby
  • License
    Other
  • Created over 12 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Calabash for iOS
master develop versioning license contributing
Build Status Build Status GitHub version License Contributing

Calabash iOS

After delivering support for the final releases of iOS 11 and Android 8 operating systems, Microsoft will discontinue our contributions to developing Calabash, the open-source mobile app testing tool. We hope that the community will continue to fully adopt and maintain it. As part of our transition on the development of Calabash, we've provided an overview of mobile app UI and end-to-end testing frameworks as a starting point for teams who are looking to re-evaluate their testing strategy. Please see our Mobile App Testing Frameworks Overview document.

Calabash is an automated testing technology for Android and iOS native and hybrid applications.

Calabash is a free-to-use open source project that is looking for a maintainer.

Requirements

  • macOS Mojave or Catalina
  • Xcode 10.3+
  • ruby at least ruby 2.3.x

For the best Ruby experience we recommend that you use a managed Ruby like rbenv or rvm).

Please do not install gems with sudo

For more information about ruby on MacOS, see these Wiki pages:

IMPORTANT

Calabash uses private APIs to inspect your app's view hierarchy. Apps that include the Calabash iOS Server will be rejected if they are submitted to the AppStore. The tutorials below describe a number ways to add Calabash to your Xcode project that will ensure you do not accidently submit a binary that will be reject because it includes Calabash.

Getting Started

If you want to see Calabash iOS in action, head over to the Calabash iOS Smoke Test App and follow the instructions in the README. We use this app to document, demonstrate, and test Calabash iOS. You can use this app to explore Calabash and as an example for how to configure your Xcode project and Calabash workflow.

The examples below assume you are using a managed ruby or are working in the Calabash Sandbox:

$ calabash-sandbox
This terminal is now ready to use with Calabash.
To exit, type 'exit'.

Step 1: Link calabash.framework

To start using Calabash in your project, you need to link an Objective-C framework (calabash.framework) to your application. These instructions are compatible with apps that are written in Swift.

Tutorial Description
Debug Config Use linker flags in the Debug build config to load the calabash.framework
Calabash Config Create a new Calabash Build Configuration
-cal Target Add a new app target to Xcode.

If you want to get started quickly, follow the Debug Config instructions. The Tutorial: How to add Calabash to Xcode wiki page discusses the merits of each approach and has instructions for using CocoaPods.

Step 2: Run Cucumber against an iOS Simulator

The Calabash iOS Example README has simple instructions for how to link the calabash.framwork, generate a features directory, run cucumber, and and open a Calabash console.

# In the directory where your .xcodeproj and Gemfile are
$ bundle exec calabash-ios gen

Build and run in Xcode, targeting an iOS Simulator. Calabash will try to detect the .app you just built.

$ bundle exec cucumber

If Calabash cannot find the .app you just built, it will raise an error. If this happens, you will to tell Calabash where it can find your .app.

By default, Xcode builds to a DerivedData directory:

~/Library/Developer/Xcode/DerivedData/<UDID>/Build/Products/Debug-iphonesimulator/<NAME>.app

Try to locate the .app and set the APP variable:

$ export APP="~/Library/Developer/Xcode/DerivedData/<UDID>/Build/Products/Debug-iphonesimulator/<NAME>.app"
$ bundle exec cucumber

We recommend using scripts and/or changing the location where Xcode stages build products. The sample projects use scripts to stage binaries to a ./Products, even when building from Xcode. You can use the Xcode > Preferences > Locations settings to do the same.

Where to go from here?

Topic Description
Getting Started A more in-depth tutorial using the LPSimpleExample.
Testing on Physical Devices Everything you need to know about testing on physical devices.
API Docs The Calabash iOS ruby API
iOS Smoke Test App Demonstrates advanced features, setups, and workflows
iOS WebView Test App Demonstrates how to interact with UIWebView and WKWebView
Getting Help The Calabash iOS Wiki

Links

License

Copyright (c) LessPainful APS. All rights reserved.
The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license. You must not remove this notice, or any other,
from this software.

More Repositories

1

calabash-android

Automated Functional testing for Android using cucumber
Ruby
1,681
star
2

calabash

Automated Acceptance Testing for Mobile Apps
Ruby
129
star
3

x-platform-example

Example of cross-platform BDD with Cucumber and Calabash
Ruby
90
star
4

calabash-ios-server

An embedded HTTP server for performing queries and test automation
Objective-C
87
star
5

ios-smoke-test-app

An app for testing TestCloudAgent/LPServer behaviors
Objective-C
41
star
6

run_loop

The bridge between Calabash iOS and Xcode command-line tools like instruments and simctl.
Ruby
32
star
7

calabash-android-server

Automated Functional testing for Android based on cucumber
Java
28
star
8

calabash-ios-example

An example project for Calabash iOS
Objective-C
23
star
9

iOSDeviceManager

Used for managing devices/sims
Objective-C
23
star
10

DeviceAgent.iOS

DeviceAgent.iOS is an XCUITest -Runner.app that is used by Xamarin.UITest and Calabash iOS to perform UI tests on iOS applications.
Objective-C
16
star
11

ios-webview-test-app

WebView app for testing TestCloudAgent/LPServer
Objective-C
6
star
12

calabash-js

Shared JavaScript for webview support in calabash
JavaScript
6
star
13

screenshotTaker

Java
5
star
14

ios-setup-examples

Examples of how to add Calabash iOS Server to your app
Objective-C
4
star
15

Calabash-2.0-x-platform

X-platform for 2.0
Ruby
4
star
16

field-service-example

Xamarin Field Service sample used at Evolve
C#
4
star
17

Permissions

An iOS App + Test Suite to demonstrate that DeviceAgent.iOS can automatically dismiss Privacy Alerts
Objective-C
4
star
18

calabash-apk-builder

A very limited replacement for apkbuilder. Its sole purpose in life is to build the calabash-android test server
Java
3
star
19

memoryPluginCalabash

Sample Calabash iOS plugin
Ruby
2
star
20

.github

Calabash GitHub org config
1
star
21

luffa

A gem for testing the Calabash Toolchain
Ruby
1
star
22

location-one

Ruby
1
star
23

fragment-model

Development of the fragment model.
Ruby
1
star
24

CalabashJavaClient

Java
1
star
25

ios-iphone-only-app

An iPhone only app linked with Calabash to test iPad emulation
Objective-C
1
star
26

jenkins

Jenkins / Blue Ocean pipeline scripts
Groovy
1
star