Tired of ads? Enjoy an ad-free experience by signing up.
  • Insights
    This article was written by a TIA community member. Insights pieces undergo the same rigorous editorial process that newsroom-produced articles have.
Mayank Gupta · · 7 min read

How we built a tool to address testing challenges at Grab

programming-code-issue

Photo credit: welcomia / 123RF

This article was co-authored by Shivkumar Krishnan (engineering leader at Grab) and Vineet Nair Kallazhy (technical writer at Grab), and is part of Tech in Asia’s content partnership with Grab. Visit their engineering blog here.

At Grab, we look at launching new features or improving existing ones. This means that we need to develop fast without compromising quality—a difficult balance to strike.

To tackle this, we developed Mockers, a tool to expand the scope of local box testing. In local box testing, developers can test their microservices without depending on an integrated test environment. It is an approach to implement “shift left testing,” where testing is performed earlier in the product life cycle. This makes testing easier and fixing bugs less expensive.

The complexity we’re addressing

Grab employs a microservices architecture, with over 250 microservices working together. Think of our application as clockwork with coordinating gears. Each gear may evolve and change over time, but the overall system continues to work.

microservices-chart

Each microservice runs on its own and communicates with others through lightweight protocols like HTTP and gRPC, and each has its own development life cycle. This architecture allows Grab to quickly scale its applications.

However, the complexity of a microservices architecture makes testing much harder. Here are some common challenges:

  • Each team is responsible only for its microservices, so there’s little centralized management.
  • Teams use different programming languages, data stores, etc. for each microservice. This makes it hard to construct and maintain a good testing environment that covers everything.
  • Some microservices have been around since the start, some were created last week, some were refactored a month ago, and so on. This means that microservices are at very different maturity levels.
  • As the number of microservices keeps growing, so does the number of tests needed for coverage.

Why conventional testing is not enough

The conventional approach to testing involves heavy unit testing on local boxes and maintains one or more test environments with all microservices. These are usually called staging environments. Teams run integration, contract, and other tests on the staging environment, making it the primary test area. After comprehensive testing on staging, teams promote the microservice to production. Once it reaches production, very little or no testing is done.

(The terminologies used here such as unit tests, integration tests, and contract tests are defined here and here.)

conventional-testing

What is Mockers

Road ahead

Stay ahead in Asia’s tech landscape

You've reached your 2 free content limit for the month. Sign up for free to read the full story.

🏄 For casual readers / 👶 Free

Basic

US$0

Free forever

Get instant access to this article and more every month

0 premium content

Unlimited news briefs

5

5 articles

Ad-free reading experience

Just US$0 per day

⌛Sign up in 20s. No payment details needed.

📖 For learners / 👍 Starter

Lite

US$4.92/month

Billed annually at US$59/year

Get instant access to this article and more every month

4

4 premium content

Unlimited news briefs & articles

Ad-free reading experience

Just US$0.17 per day

Cancel anytime

Our subscriber community includes professionals from these companies:

Stay updated on the go with our mobile app.

Get latest insights with smoother, more personalized experience through TIA mobile app.

Community Writer

Mayank Gupta

Mayank works for the Developer Experience team at Grab, building tools to enhance dev experience and productivity. Prior to Grab, he worked for Flipkart, Oracle, and Accenture as an Engineer building scalable applications such as online National Library of Journals, Warehouse or Order Management System, etc.