Calabash 0.17.0

This release requires a server update to 0.17.0.

It also requires at least run-loop 2.0.

Calabash iOS now requires ruby >= 2.0.

Usage Tracking

Staring in Calabash iOS 0.17.0, we are collecting usage statistics when an app is launched. Usage tracking will be added to the next release of Calabash Android and Calabash 2.0.

Why?

We want to do a head count; how many people use Calabash?

There are a bunch of features in the pipeline and we don't know which are the most important to focus on.

What is tracked?

We are not collecting your name, email address, the name of your app, your IP address, or any other identifying information. This is an open source project so you can see for yourself what we information we are tracking.

Can I turn tracking off?

You can control what gets tracked using the following commands in the console:

$ bundle exec calabash-ios console
> disable_usage_tracking
Calabash will not collect usage information.
"none"

> enable_usage_tracking
Calabash will collect statistics using the 'system_info' rule.
"system_info"

> enable_usage_tracking("events")
Calabash will collect statistics using the 'events' rule.
"events"

Break Changes

We've updated our VERSIONING.md docs to reflect the reality of Calabash 0.x for both iOS and Android:

For marketing and technical reasons, we cannot bump the major version of this gem. When we bump the minor version of the repo, expect non-backward compatible changes. We go to great lengths to limit breaking changes, but sometimes it cannot be helped. We will document when these changes occur.

Expanded backdoors

The backdoor API now supports arbitrary Objective-C selectors. The new API supports almost every return type, including void, almost every argument type, and any number of arguments. We've even added support for passing nil and self as arguments.

We've written cucumbers to demonstrate the API in the iOS Smoke Test App.

This API change will break backdoor calls if you are using message forwarding in your App Delegate to forward backdoors to another class.

RESET_BETWEEN_SCENARIOS

This feature has been one of the hardest parts of Calabash to maintain. The iOS Simulator environment has changed a great deal since Xcode 4 and changes with almost every iOS release (major and minor). This release corrects a long-standing bug in Calabash iOS: In CoreSimulator environments RESET_BETWEEN_SCENARIOS=1 resets the simulator contents and settings; should only reset the app sandbox.

This fix shifts the responsibility of managing the app sandbox to run-loop. The consquence of this change is that reset_app_sandbox has been deprecated; it is now a no op. To reset your application's data between Scenarios you have two options:

  • set RESET_BETWEEN_SCENARIOS=1
  • pass { :reset => true } to relaunch or start_test_server_in_background.

If you need to reset a simulator's Content and Settings, you use:

  • Calabash::Cucumber::Launcher#reset_simulator

Keep an eye on this pull request Add ruby API for resetting the simulator content and settings #939 for some changes to reset_simulator method in 0.17.*.

Thank you for waiting patiently for this problem to be fixed.

Announcements

If you are not already using bundler and Gemfile, we strongly recommend that you start.

If you are installing gems with sudo, we strongly recommend that you install a managed ruby or manage your gem environment manually.

We have rolled out a new tool for people who are just getting started with ruby and Calabash on MacOS: the calabash-sandbox. The sandbox replaces the old Calabash MacOS installer.

Docs and Examples

For this release, we've updated the README and many of the wiki pages. At the moment the wiki is publicly editiable. If you see a typo or a way to improve the docs, please make the change. If the change is significant, create an issue and we can discuss.

We have also updated the following two repositories:

  • LPSimpleExample
    • compiles - thanks to everyone who reported
    • has getting started instructions
  • iOS Smoke Test App
    • nearly 100% coverage of all the Calabash iOS gestures and behaviors
    • examples of how manage the app life cycle and reset the keychain
    • scripts that demonstrate an efficient Calabash workflow, including how to stage binaries from Xcode builds and how to submit to the Xamarin Test Cloud.

:preferences

In Xcode 7, Apple once again changed/broke the UIAutomation Preferences API. We've updated the server so the :preferences strategy is available again. The great news is that :preferences now works on physical devices on iOS >= 9.0! For now, we are keeping the default strategy as :host. You can opt in to :preferences by:

# Cucumber hook
options = {
  :uia_strategy => :preferences
}

launcher.relaunch(options)

# Console
> start_test_server_in_background({:uia_strategy => :preferences})

As we get feedback about :preferences, we'll change the defaults.

Xamarin Test Cloud users: :preferences is now available for you!

Misc

  • We've updated the features skeleton that is generated when you run calabash-ios gen.
  • send_app_to_background is fixed for iOS 9
  • added shake to the API to simulator shaking the device @tommeier
  • Fixed the double-launch problem - Core: prevent double launching of simulator #341 @fmuzf
  • The Calabash iOS Server project now contains cucumbers and a workflow for contributors to test changes to the server.
  • Server logs IP address at launch #265 @Oddj0b

Calabash 2.0

Calabash 2.0 is in pre-release.

Please report issues with Calabash 2.0 as a GitHub issue or on Stack Overflow.

We are looking for help from the community to finish implementing Calabash 2.0. You can see what has to be done in the project GitHub issues.

Xamarin Test Cloud users: Calabash 2.0 is not yet supported on Test Cloud. Test Cloud support will be available before Calabash 2.0 is released.

Documentation

This is a reminder to check out the Calabash documentation on the Xamarin site. The information there is excellent and constantly improving.

http://developer.xamarin.com/testcloud/

Deprecated

See https://github.com/calabash/calabash-ios/wiki/Deprecated

  • RunLoop::XCTools has been deprecated (replaced) in run-loop 1.5.0.
  • RunLoop::Bridge::Simctl has been deprecated (replaced) in run-loop 2.0
  • RunLoop::SimControl is in the process of being deprecated; planned for run-loop 3.0

Hot Topics

See https://github.com/calabash/calabash-ios/wiki/Hot-Topics

  • instruments and Instruments.app cannot launch apps on iOS 7.1 Simulators on Yosemite with Xcode 6
  • Xcode 6.3 - instruments cannot launch my app on iOS 8.3 Simulators [RESOLVED]
  • Enable Development After Upgrading Devices to 8.*
  • Errno::EINTR: Interrupted system call
  • NSLog output can cause apps to become unresponsive during testing

Xamarin Workbook

If it's not already installed, install the Xamarin Workbooks app first. The workbook file should download automatically, but if it doesn't, just click to start the workbook download manually.