Skip to content
This repository has been archived by the owner on Jun 6, 2019. It is now read-only.

Latest commit

 

History

History
209 lines (149 loc) · 8.2 KB

File metadata and controls

209 lines (149 loc) · 8.2 KB
id title
DB2E66AD-1806-48E3-A79F-6A936DAA4A3E
Calabash iOS 0.19.0

This is a significant release. We have dropped many legacy APIs and behaviors to make space for our new DeviceAgent tool; our replacement for UIAutomation. This release of Calabash does not contain an interface to DeviceAgent, but if you look at commit history of run_loop, you will see that have already started integrating DeviceAgent with Calabash.

Requirements:

  • Calabash iOS server == 0.19.0
  • run_loop >= 2.1.1
  • Ruby >= 2.0

These two wiki pages have instructions for updating the most recent versions.

Sudo

Please do not install gems with sudo.

If you are just getting started with Ruby and Calabash on MacOS, we have a new tool: the calabash-sandbox.

For advanced users, we recommend a managed ruby.

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

IMPORTANT

The WebiView marked API [1] has been removed; see this issue [2] for more details.

The done method has been removed [3] from the public API because it conflicts with Cucumber 2.1 done.

The tap method has been removed from the public API. It has been deprecated since 0.10.0. Use touch. Thank you for everyone who reported problems and for your patience.

The map method has been replaced with Calabash::Cucumber::Map.map. [4]

Calabash::Cucumber::Launcher has been rewritten. You will find many methods have been deprecated or removed. You might need to update your launch hooks. In particular, you should note that RunLoop::Core.simulator_target? has been deprecated. You should use the following methods from Launcher instead: [5]

# Call with no argument.  The `options` argument has been deprecated.
#
# It is safe to call on the Xamarin Test Cloud.
Calabash::Cucumber::Launcher#simulator_target?
Calabash::Cucumber::Launcher#device_target?

Calabash no longer responds to these environment variables:

  • CALABASH_NO_DEPRECATION
  • DETECT_CONNECTED_DEVICE
  • CALABASH_FULL_CONSOLE_LOGGING

These variables are being replaced:

  • NO_STOP is in the process of being deprecated; use QUIT_APP_AFTER_SCENARIO
  • BUNDLE_ID and APP_BUNDLE_PATH are in the process of being replaced with APP.

The public documentation [6] describes what variables Calabash iOS responds to.

If you use a custom .irbrc, please take a look at the new .irbrc [7] that ships with Calabash.

Improvements

The calabash-ios console was updated with methods to improve discoverability and your workflow.

Thanks to @ark-konopacki for porting console methods from briar and Calabash 2.0

$ bundle exec calabash-ios console

#########################  Useful Methods  ##########################
     ids => List all the visible accessibility ids.
  labels => List all the visible accessibility labels.
    text => List all the visible texts.
   marks => List all the visible marks.
    tree => The app's visible view hierarchy.
   flash => flash(<query>); Disco effect for views matching <query>
 verbose => Turn debug logging on.
   quiet => Turn debug logging off.
    copy => Copy console commands to clipboard.
   clear => Clear the console.

Calabash says, "Don't touch that button!"
calabash-ios 0.19.0.pre2>

The DEVICE_TARGET method can take a device name as an argument as long as it appears in the output of xcrun instruments -s devices. We recommend device names without spaces, using only numbers and letters.

$ xcrun instruments -s devices
Known Devices:
stern [4AFA58C7-<snip>-04301E70E235]
denis (9.3.1) [19368<snip>d8dd0d]

$ DEVICE_TARGET=denis DEVICE_ENDPOINT=http://denis.local:37265 bundle exec cucumber

We are experimenting with the automatic detection of the DEVICE_ENDPOINT. Pull requests are welcome. [1][2]

The method set_text is no longer deprecated. Enjoy responsibly.

Docs and Examples

For this release, we've updated the README and many of the wiki pages. At the moment the wiki is publicly editable. 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 repositories:

  • LPSimpleExample
    • Getting starting with Calabash
  • 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.
  • iOS WebView App
    • Updated with iframe examples

:preferences

We've discovered the :preferences is not stable enough to use on Simulators or physical devices. The default will remain :host.

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

As of 0.19.0, if you see a method on this list, it has probably been removed.

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

  • RunLoop::SimControl is in the process of being deprecated; planned for run-loop 3.0
  • NO_STOP is in the process of being deprecated; use QUIT_APP_AFTER_SCENARIO
  • BUNDLE_ID, APP_BUNDLE_PATH are in the process of being replaced with APP.

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. iOS 7 Simulators are not supported on El Cap.
  • Errno::EINTR: Interrupted system call (FIFO)
  • NSLog output can cause apps to become unresponsive during testing