Badoo Rajdeep Varma Apr 5, 2017

Breaking the Limitations of Calabash Android

Article Summary

Rajdeep Varma from Badoo cracked a problem that's plagued mobile test automation for years: Calabash could only test what's inside your app, while Appium couldn't use backdoor methods. His solution? Merge the best of both worlds.

Badoo's QA team relied on Calabash for Android test automation due to its speed and stability, but hit a wall when trying to test notifications and system-level interactions. This article details how they integrated UIAutomator 2.0 into Calabash-Android-server to break through its fundamental limitation of only accessing application UI.

Key Takeaways

Critical Insight

By adding UIAutomator 2.0 support to Calabash-Android-server, Badoo maintained their stable test framework while gaining the ability to test notifications, widgets, and any system-level Android interactions.

The article includes working code examples and a downloadable gem, plus hints at 'Android Instrumentation secrets' the author discovered during implementation.

About This Article

Problem

Badoo's Calabash-Android framework couldn't access Android system notifications or device-level UI elements. Robotium's Instrumentation framework only allows control over the application being tested, which blocked important testing scenarios.

Solution

Rajdeep Varma added UIAutomator 2.0 to Calabash-Android-server by creating a UiDevice object from the same Instrumentation instance. He then built new Action commands like 'pull_notification' and 'uiautomator_touch_partial_text' that Ruby tests could call.

Impact

The updated framework let Badoo QA test push notifications, homescreen widgets, intent dialogs, and interactions with third-party apps. These tests weren't possible before. The framework kept Calabash's stability and speed advantages over Appium.