Octopus to the Rescue: the Fascinating World of Inter-App Communications at Uber Engineering

Apple Chow, Bian Jiang
7 min readadvanced
--
View Original

Overview

The article discusses the challenges faced by Uber Engineering in building UI testing frameworks for mobile apps, particularly focusing on inter-app communication. It introduces Octopus, a solution developed to facilitate seamless communication between the Uber rider and driver apps during testing.

What You'll Learn

1

How to implement inter-app communication for mobile testing using Octopus

2

Why cross-process communication is crucial for testing mobile applications

3

When to use signaling mechanisms in automated testing environments

Prerequisites & Requirements

  • Understanding of mobile application testing concepts
  • Familiarity with Appium and its functionalities(optional)

Key Questions Answered

What makes testing Uber mobile apps different from testing Google Maps?
Testing Uber mobile apps involves unique challenges due to the interdependent nature of the rider and driver apps. Unlike standalone applications like Google Maps, Uber's apps require synchronized testing to ensure proper communication between the two, especially during complex scenarios like uberPOOL.
How does Octopus facilitate testing for Uber's mobile applications?
Octopus is a platform-agnostic test runner that manages interprocess communication between the rider and driver apps during testing. It allows tests to run simultaneously on different devices while ensuring they can send and receive signals to coordinate actions, thus simulating real-world interactions.
What are the methods provided by Octopus for signaling?
Octopus provides two main methods: readSignal() to read the next signal from a signal channel, and writeSignal(signalContent, destination) to send a signal to a specified destination. These methods enable seamless communication between different test targets during automated testing.

Technologies & Tools

Testing Framework
Appium
Used for automating mobile application testing.

Key Actionable Insights

1
Implementing Octopus can significantly enhance the efficiency of your mobile testing framework by allowing for real-time communication between apps.
This is particularly useful in scenarios where multiple apps interact, such as ride-sharing applications, where the rider and driver apps must work in sync.
2
Utilizing signaling mechanisms can help reduce flakiness in tests by ensuring that communication between processes is reliable.
By adopting a robust signaling approach, teams can minimize the chances of test failures caused by communication issues, leading to more stable testing outcomes.

Common Pitfalls

1
One common pitfall is relying on network-based communication for inter-app signaling, which can introduce latency and flakiness in tests.
This often leads to unpredictable test results, making it difficult to diagnose issues. A more robust solution, like Octopus, mitigates these problems by using direct signaling mechanisms.

Related Concepts

Mobile Application Testing
Cross-process Communication
Automated Testing Frameworks