Cost-effective and easy to maintain GraphQL integration tests (zio-test and Caliban)
summary
Shows that integration tests for a Caliban GraphQL API can live in the same repo, use zio-test and Caliban, and be generated and kept up to date by a compile-time Caliban sbt plugin that emits a client on compile so API changes break compilation. Tests run against a real Kafka instance using an embedded Kafka shared per-suite to avoid slow restarts. The plugin is ~400 lines, took about a week to write, works but has a remaining incremental-regeneration bug (issue 1052).
AI-written summary · about
chapters (9)
- 0:00Start
- 2:05The Team
- 2:50The Product Console
- 4:56The Problem - Weird
- 6:42The Analysis - Please don't
- 8:00The Analysis - What we want
- 12:09The Contribution How does it work internally?
- 14:38The Composition - sbt configuration topology
- 20:00The Conclusion
related talks
40mScala, Docker and Testing oh my!
44mTesting: Integration Tests - The good, bad and ugly
28mIntegration testing with Bazel
50mLevel Up Your Automated Tests
30mRunning Docker-Based Integration Tests in Scala: A Case Study
01h 12mUnit Tests as a Specification
49mFabulous Tests with Spock and Groovy
50mHow to Test a Milion Lines of Code without Writing a Single Test
