~/talk

How to enjoy E2E testing in Kotlin / Spring

Talkat DevConf.CZ 2023 · 2023-06-16..06-18· [kotlin, testing]
links:none on file
slides:none on file

Claims TDD E2E for REST APIs in Kotlin Spring is practical and pleasant, then demonstrates it: tests are functions in Kotest, HTTP calls use WebTestClient, third‑party APIs are stubbed with WireMock while the database runs as a real Postgres in Testcontainers, and MockK replaces beans in Spring. A small client/offices API is driven red‑green‑refactor style, tests run in IntelliJ, server starts and Postman shows the expected JSON, and reusable Testcontainers keeps iteration fast.

AI-written summary · about

  1. 0:00Introduction
  2. 1:05Web app architecture overview
  3. 2:31Testing strategies in Spring
  4. 3:54TDD for API development
  5. 4:58Choosing testing tools
  6. 6:01Why Kotest for Kotlin
  7. 7:08Mocking with MockK
  8. 8:17Testing with real DBs
  9. 9:21Speeding up tests with Testcontainers
  10. 9:41Running real servers for E2E
  11. 10:27Encapsulating API calls
  12. 11:10Preparing test data
  13. 12:14Kotlin DSL for test data
  14. 12:58Optimizing test speed
  15. 14:24Live coding intro
  16. 15:27TDD client controller
  17. 18:22Mocking in demo
  18. 20:23Adding office creation
  19. 22:07Testing office inclusion
  20. 23:39Handling office deactivation
  21. 26:59Refactoring acceptance criteria
  22. 27:20Validating app with tests
  23. 28:06Key takeaways
  24. 28:26Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.