Testing API Resiliency using Kotlin: Leveraging FP at Scale
summary
Kotlin code in Specmatic generates hundreds of contract tests from an OpenAPI spec and then runs them; a 4,430‑line spec would blow up into tens of thousands of permutations but here Specmatic produces 351 dynamic tests for a sample API and all pass. The implementation switches from eager lists to lazy sequences and Either monad to avoid heap exhaustion, stabilize GC/CPU, and let property‑style generators plus mutation transforms exercise nulls, enums, ranges and type mutations against a live Spring Boot service.
AI-written summary · about
chapters (8)
- 0:00Welcome
- 1:10API resiliency basics
- 7:11Live demo: Specmatic
- 16:34Negative test scenarios
- 22:59Combinatorial explosion challenge
- 26:55Solving memory issues with lazy lists and monads
- 33:40Key functional programming improvements
- 36:31Q&A
related talks
49mTesting Kotlin at Scale: Spek
41mTesting in Kotlin: The Holy Grail of Readability and Power
32mTesting with Kotlin
24mUsing API spec as an Executable Contract To Mock and Test Microservices
51mContract-Driven Development-Escape Microservices Integration & Deployment Hell
50mRun Specs & Avoid Wrecks — A "Speed With Seatbelts" Lab
44mSeamless Upgrades: Mastering API Compatibility
50mSupercharge Spring Boot Tests with Kotlin DSL Power
