Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Integration and end-to-end testing with TestСon...
Search
Nikolay Kuznetsov
June 26, 2019
Programming
37
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
140
Integration testing with TestContainers-Go
nikolayk812
0
290
Integration testing with TestСontainers and JUnit 5
nikolayk812
0
180
TestContainers + JUnit 5 = elegant integration and e2e tests for microservices
nikolayk812
2
380
Integration and end-to-end testing with TestСontainers
nikolayk812
0
130
Other Decks in Programming
See All in Programming
【高い買い物LT会】初任給で話題の国産フィジカルAIを買った話
akagami
PRO
0
150
Laravelのアプリケーションをどこにデプロイするか #ツナギメオフライン.9
akase244
0
120
Omarchy Tokyo やると聞いて UMPC 買ってセットアップしてきた
mtsmfm
0
140
tsc.rip を支える技術 / Kyoto.なんか #8
susisu
0
4.4k
MIZARU@SPAJAM2026 第二回予選
1901drama
0
110
App Storeの外へ──日本のiOSサイドローディング入門 for iOSDC Japan 2026
yuukiw00w
0
180
iOS開発×AI駆動開発 〜最近使って便利だったスキルの話〜
nogu66
0
140
ALB ログから Trace を気合で繋げる技術
fohte
7
880
AWS DevOps Agentで インシデント対応をAIに任せたい
honmarkhunt
7
2.7k
GKE アップグレード前に知っておきたい Blue/Green と PDB の関係
stkk
0
160
変化を抱擁するドキュメントの作り方 - ビジネスルール駆動開発がもたらす、コードとの新しい関係
ioki
2
150
GKE で Pod の見方を変えたら、スケールアウト時の挙動を真に捉えられた話
stkk
0
110
Featured
See All Featured
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
880
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
The untapped power of vector embeddings
frankvandijk
2
1.9k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
3
1.2k
[RailsConf 2023] Rails as a piece of cake
palkan
59
7k
WENDY [Excerpt]
tessaabrams
13
39k
How to Ace a Technical Interview
jacobian
281
24k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Odyssey Design
rkendrick25
PRO
2
800
Facilitating Awesome Meetings
lara
57
7.1k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.6k
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