Traveloka Ahmad Fadli Jan 24, 2020

Reproxy: Mock Server for Mobile App Development

Article Summary

Ahmad Fadli from Traveloka's Experience team built a mock server that freed his mobile team from backend API dependencies. What started as a simple workaround evolved into a tool now used across product teams.

Mobile teams often get blocked waiting for backend APIs during development and testing. Traveloka's Android engineers tried multiple approaches (runtime value changes, abstraction layers, in-app mocks) before creating Reproxy, an Express.js-based mock server that runs locally with zero-rebuild JSON configuration.

Key Takeaways

Critical Insight

Reproxy eliminated backend dependencies for mobile testing through a flexible, rule-based mock server that requires minimal app code changes and no rebuilds.

The article reveals how the team uses SEQUENCE and DELAY response types to test a specific UI state that's nearly impossible to reproduce with real APIs.

About This Article

Problem

At Traveloka, mobile engineers had to wait 3 minutes for Android builds whenever they changed mock responses. This blocked QA testing and meant feature validation had to wait until the backend API was ready.

Solution

Ahmad Fadli's team built Reproxy, an Express.js server that moved the mock router logic out of the app. It uses JSON rule-based configuration and a JS_SCRIPT delegation pattern, so the team can extend it without touching core files.

Impact

Reproxy let engineers change configurations at runtime instead of rebuilding. The team also used it for automation testing on unstable staging servers and for stakeholder demos by adding dynamic RuleSet entry points to the base URL.