Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Integration and end-to-end testing with TestСon...
Search
Nikolay Kuznetsov
June 26, 2019
Programming
30
0
Share
Integration and end-to-end testing with TestСontainers
Nikolay Kuznetsov
June 26, 2019
More Decks by Nikolay Kuznetsov
See All by Nikolay Kuznetsov
Integration testing with TestСontainers-Go
nikolayk812
0
130
Integration testing with TestContainers-Go
nikolayk812
0
270
Integration testing with TestСontainers and JUnit 5
nikolayk812
0
170
TestContainers + JUnit 5 = elegant integration and e2e tests for microservices
nikolayk812
2
360
Integration and end-to-end testing with TestСontainers
nikolayk812
0
120
Other Decks in Programming
See All in Programming
ローカルで稼働するAI エージェントを超えて / beyond-local-ai-agents
gawa
3
280
Server-Side Kotlin LT大会 vol.18 [Kotlin-lspの最新情報と Neovimのlsp設定例]
yasunori0418
1
170
Angular Signal Forms
debug_mode
0
110
〜バイブコーディングを超えて〜 チームで実験し続けたAI駆動開発
tigertora7571
0
140
Kubernetes上でAgentを動かすための最新動向と押さえるべき概念まとめ
sotamaki0421
3
560
Claude CodeでETLジョブ実行テストを自動化してみた
yoshikikasama
0
120
GitHubCopilotCLIをはじめよう.pdf
htkym
0
210
PHPで TLSのプロトコルを実装してみるをもう一度しゃべりたい
higaki_program
0
210
Coding as Prompting Since 2025
ragingwind
0
840
2026_04_15_量子計算をパズルとして解く
hideakitakechi
0
110
AIベース静的検査器の偽陽性率を抑える工夫3選
orgachem
PRO
3
340
属人化しないコード品質の作り方_2026.04.07.pdf
muraaano
0
220
Featured
See All Featured
The Spectacular Lies of Maps
axbom
PRO
1
710
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
160
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
320
Odyssey Design
rkendrick25
PRO
2
580
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.2k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
220
Mind Mapping
helmedeiros
PRO
1
160
Designing Powerful Visuals for Engaging Learning
tmiket
1
350
Faster Mobile Websites
deanohume
310
31k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
210
Six Lessons from altMBA
skipperchong
29
4.2k
Transcript
Integration and end-to-end testing with TestСontainers Nikolay Kuznetsov @nikolayk812 ContainerDays,
Hamburg, 26 June 2019
About me • Go developer at Zalando Helsinki • Java
developer at Infobip, DevExperts • C developer at Samsung, Motorola
Why integration testing?
Trade-offs Test Runtime
Integration testing evolution • In-memory mocking • Local DBs •
Vagrant • Docker, Docker Compose • Docker API
How to start Docker containers for integration test? • Shell
scripts • Maven plugin • Docker Compose • … • MiniKube, Kubernetes
Shell scripts
Maven plugins github.com/fabric8io/docker-maven-plugin
Docker Compose
None
TestContainers • github.com/testcontainers/testcontainers-java • Wraps docker-java library • Docker environment
discovery • Host port randomization • Containers clean up on JVM shutdown • Waiting strategies
As simple as static PostgreSQLContainer postgres = new PostgreSQLContainer(); static
GenericContainer redis = new GenericContainer("redis:5.0.5") .withExposedPorts(6379);
Docker environment discovery
Host port randomization • To prevent port conflicts • Enables
parallel builds • API to get a host port
Containers cleanup https://github.com/testcontainers/moby-ryuk
Waiting strategies
Demo github.com/nikolayk812/cd-tc-demo
Why end-to-end testing? • Test business flows which go through
multiple microservices before production deployment • Replace a legacy service with a new implementation, make sure business flows hold
E2E setup Item Service User Service Spring Cloud Netflix Eureka
None
Demo github.com/nikolayk812/cd-tc-demo
Hints • Host port forwarding Testcontainers.exposeHostPorts() • Fixed host port
for remote debug GenericContainer.addFixedExposedPort() • Disable Ryuk set env TESTCONTAINERS_RYUK_DISABLED=true
Alternatives to E2E testing Goal is to minimize chances of
breaking production • Staging environments Handling team boundaries? • Canary deployment • Contract testing Spring Cloud Contract
Modules • 10+ DB modules • MockServer • LocalStack =
Atlassian’s local AWS cloud stack • Toxiproxy • Kafka
Takeaways • https://testcontainers.org • Balance between flexibility, speed and features
• Works on Mac, Linux, Windows
Thank you! @nikolayk812 nikolayk812