How Google tests its APIs

 — 1 minute read

In ”Testing Google’s New API Infrastructure” Anthony Vallone describes how Google tests its public APIs which are available for different programming languages and platforms:

As of this writing, we have released 10 language-specific client libraries and 35 public APIs built on this infrastructure. Also, each of the libraries need to work on multiple platforms. Our test space has three dimensions: API (35), language (10), and platform (varies by lib).

Instead of testing all possible combinations, they use a dedicated Test API:

We want to avoid creating library-specific tests, because this would lead to mass duplication of test logic. The obvious solution is to create a test library to be used by all tests as an abstraction layer hiding the various libraries and platforms. This allows us to define tests that don’t care about library or platform.

See the figures for details.