Bumble Rajdeep Varma Apr 5, 2017

Breaking the Limitations of Calabash Android

Article Summary

Rajdeep Varma from Badoo cracked a problem that's plagued Android test automation for years. His solution lets Calabash test anything on the device, not just your app's UI.

Calabash-Android is fast and stable but has a critical limitation: it can only interact with UI elements inside your app. That means no testing push notifications, home screen widgets, or system dialogs. Badoo's QA team needed a fix without migrating their entire test suite to Appium.

Key Takeaways

Critical Insight

By bridging UIAutomator 2.0 with Calabash's Instrumentation backend, teams can now test system-level Android interactions while keeping Calabash's performance benefits.

The article includes step-by-step code examples and reveals specific 'secrets' about Android Instrumentation that made this integration possible.

About This Article

Problem

Calabash-Android only worked with UI elements inside the app itself because it relied on the Instrumentation framework. This meant QA teams couldn't automate push notifications or system-level interactions, which Appium could handle.

Solution

Rajdeep Varma added UIAutomator 2.0 to Calabash-Android's server by creating a UiDevice object in the shared Instrumentation backend. He then built new Action commands including 'pull_notification' and 'uiautomator_touch_partial_text'.

Impact

The flakiness from device dynamics went away while keeping Calabash's speed and backdoor method support. Teams could now test homescreen widgets, intent dialogs, and third-party app interactions without switching to Appium.