# Marionette - Enabling E2E User-scenario Simulation

[Grab](https://yomu.fyi/company/grab) · Anish Jha · Dec 23, 2019

**Type:** Problem & solution

## Summary

Conducting end-to-end testing across Grab's transport microservices became difficult due to service availability, environment construction, cross-service authentication, and complex data setups for real-world user accounts. To address these challenges without relying on physical mobile devices or emulators, Grab built Marionette, an internal simulation platform for passenger and driver interactions. The platform provisions required test data, coordinates booking lifecycles, and isolates test executions across distinct user groups using localized cohorts. Engineers can configure driver and passenger behaviors, execute workflows, and run load or integration tests through a dedicated user interface, a Go SDK, and RESTful APIs.

## Context

Testing interconnected microservices across Grab's transport ecosystem was time-consuming, expensive, and constrained by complex test data setup, multi-protocol communication, and service availability across independent teams.

## Approach / What changed

Grab built Marionette, an internal end-to-end simulation platform that sets up test data, mimics passenger and driver behaviors, isolates simulations using cohorts, and exposes controls via a UI, a Go SDK, and RESTful APIs.

## Takeaways

- Marionette isolates test runs by grouping simulated passengers and drivers into city-based cohorts, preventing shared resource collisions during concurrent executions.
- The platform eliminates the need for physical mobile devices and third-party emulators by simulating mobile app interactions and booking state transitions directly against backend microservices.
- Developers can interact with Marionette via a web UI for manual and visual testing, a Go SDK for IDE-triggered workflows, or language-agnostic RESTful APIs for automated scripts.

**Tags:** [Developer Experience](https://yomu.fyi/topic/developer-experience), [Go](https://yomu.fyi/topic/go), [Microservices](https://yomu.fyi/topic/microservices), [REST APIs](https://yomu.fyi/topic/rest-api), [Testing](https://yomu.fyi/topic/testing)

[Read original post](https://engineering.grab.com/marionette-enabling-e2e-user-scenario-simulation)
