Declarative Test Setup
summary
Datasite replaces brittle, manual test fixtures with a Kotlin DSL that declaratively describes environment components and then finds-or-creates them via client calls. It uses Kotlin features—lambdas with receiver, extension functions and @DSLMarker—to make setup extensible and type-safe, applies batching/prefetching to cut API calls, and implements idempotent “find or create” semantics. The result standardizes end-to-end API configuration across dozens of backend services and noticeably speeds and stabilizes tests.
AI-written summary · about
chapters (8)
- 0:00Start
- 1:17Where We Started
- 4:38Why a DSL?
- 6:41Sneak Peek
- 7:36Language Features
- 14:51Building a DSL
- 19:59Domain Modeling
- 29:25E2E Tests
related talks
37mLeveraging Kotlin to write maintainable UI tests
29mTesting in Practice: Keeping Your Tests Concise and Declarative
50mSupercharge Spring Boot Tests with Kotlin DSL Power
36mBest Practices for Unit Testing in Kotlin
23mCreating data for Functional Tests with the Test Data Builder Pattern
25mIdiomatic Kotlin in Tests
47mManaging Testing Data
53mSolving Espresso Android Autotest Issues in the Real World
