Declarative Test Setup

May 04, 2023 32 min Free

Description

Recording brought to you by American Express.

A good test should be fast, reliable, and concise. Unfortunately end-to-end API tests can often suffer in all 3 areas. Large amounts of test setup required by end-to-end API tests can make them slow, flaky, and verbose. At Datasite, they built a Kotlin DSL.

Instead of writing repetitive, imperative code to perform test environment setup, they designed a DSL which declaratively defines the environment components needed for end-to-end tests. This allows them to optimize when and how the setup is performed, improves standardization of the environment, and simplifies the code required for test setup.

This talk covers how Datasite built this custom Kotlin DSL, how they made it extensible, idempotent, and performant, and how it helped them standardize end-to-end test configuration across dozens of backend services.

Up Next