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
0
29
Integration and end-to-end testing with TestСontainers
Nikolay Kuznetsov
June 26, 2019
Tweet
Share
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
260
Integration testing with TestСontainers and JUnit 5
nikolayk812
0
170
TestContainers + JUnit 5 = elegant integration and e2e tests for microservices
nikolayk812
2
350
Integration and end-to-end testing with TestСontainers
nikolayk812
0
120
Other Decks in Programming
See All in Programming
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
1.6k
生成AIを活用したソフトウェア開発ライフサイクル変革の現在値
hiroyukimori
PRO
0
100
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
480
AWS re:Invent 2025参加 直前 Seattle-Tacoma Airport(SEA)におけるハードウェア紛失インシデントLT
tetutetu214
2
120
AIエージェント、”どう作るか”で差は出るか? / AI Agents: Does the "How" Make a Difference?
rkaga
4
2k
AIによるイベントストーミング図からのコード生成 / AI-powered code generation from Event Storming diagrams
nrslib
2
1.9k
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
180
AI巻き込み型コードレビューのススメ
nealle
2
1.3k
AI & Enginnering
codelynx
0
120
Gemini for developers
meteatamel
0
100
余白を設計しフロントエンド開発を 加速させる
tsukuha
7
2.1k
dchart: charts from deck markup
ajstarks
3
1k
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.7k
For a Future-Friendly Web
brad_frost
182
10k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.1k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.6k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
0
1.1k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.7k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Designing Experiences People Love
moore
144
24k
Claude Code のすすめ
schroneko
67
210k
The Curious Case for Waylosing
cassininazir
0
240
Producing Creativity
orderedlist
PRO
348
40k
Google's AI Overviews - The New Search
badams
0
910
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