~/talk

Real Integration Tests with TestContainers

Talkat ContainerDays Hamburg 2018 · 2018-06-18..06-20· [testing, kubernetes]
slides:none on file

Demonstrates running throwaway Docker-backed integration tests for Elasticsearch using TestContainers and a Maven plugin, showing a real test that spins an ES container, indexes one document and asserts a single hit. Builds a tiny Java wrapper (~150 lines) around the official image, waits ~20 seconds for JVM startup, and tears down containers automatically so tests are isolated (one container per test) or reused via a static block. Notes pitfalls: deprecated Docker Hub images, port collisions, and no easy Docker-in-Docker solution. TestContainers docker start test 150 lines of wrapper

AI-written summary · about

  1. 0:00Introduction and personal intro
  2. 1:23Why integration tests matter
  3. 3:06Mocking vs real integration tests
  4. 5:12Using real data stores
  5. 5:54Live demo with Elasticsearch
  6. 8:25Standalone dependency issues
  7. 10:10In-process solutions like Flapdoodle
  8. 11:56Maven Docker plugin approach
  9. 14:28Docker Maven plugin limitations
  10. 16:47TestContainers introduction
  11. 17:51How TestContainers works
  12. 19:15Customizing TestContainers for Elasticsearch
  13. 21:02TestContainers demo in action
  14. 22:52TestContainers reuse and cleanup
  15. 23:34Why mocking fails for integration tests
  16. 24:18Build tool integration trade-offs
  17. 25:22Q&A session begins
  18. 35:19Closing remarks
~/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.