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
Scrum Gathering Rio 2016 - Containerizing Tests...
Search
Stefan Teixeira
June 24, 2016
Programming
74
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Scrum Gathering Rio 2016 - Containerizing Tests with Docker Compose
Stefan Teixeira
June 24, 2016
More Decks by Stefan Teixeira
See All by Stefan Teixeira
Scrum Gathering Portugal 2016 - Containerizing Tests with Docker
stefanteixeira
0
93
Agile Brazil 2016 - 5 fundamentos essenciais de padrões xUnit
stefanteixeira
0
120
Latinoware 2016 - Continuous Delivery com ferramentas open source
stefanteixeira
0
78
Ágiles 2016 - Using open source tools to support Continuous Delivery
stefanteixeira
0
67
6º Encontro do Grupo de Testes Carioca - Testes em um contexto de Continuous Delivery
stefanteixeira
0
54
TDC 2016 SP - Desmistificando cobertura de código como métrica de qualidade
stefanteixeira
0
140
TDC 2016 SP - Continuous Delivery para aplicações Java com ferramentas open-source
stefanteixeira
0
97
TDC 2016 SP - Cobertura de código de procedures T-SQL com SQLCC
stefanteixeira
0
85
TDC 2016 SP - 5 libs de teste JavaScript que você deveria conhecer
stefanteixeira
0
74
Other Decks in Programming
See All in Programming
機械に任せるテスト、人が見るテスト ⽣成AIで引き直した、運⽤保守フェーズの線引き
dske104
0
190
Web Framework Benchmark Battle 2026, Any%
a_matsuda
2
2k
Event is what happens
moro
2
770
FactoryBotをやめればRSpecは速くなるのか?
yuta_onishi_97
0
270
AIで開発が速くなった先で、開発チームは何を目指すか
shihochan
0
880
Findy - エンジニア向け会社紹介/Findy Company Deck
findyinc
6
400k
[Dev Group Paris Octobre 26] Agentforce, SIforce, Claudeforce, Slackbot… on s'y retrouve ?
nabondance
0
110
phperだってパンチカードでコーディングしたい
o0h
PRO
0
330
contenteditable と日本語入力に向き合う
colorful12
0
200
AWSに止められる覚悟してますか?
morizo_1984
2
530
Vue Fes Japan の “作る側”に関わってみて
naokihaba
0
160
ジョジョの世界をXRで再現する
mofurune
0
160
Featured
See All Featured
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
77k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
How Software Deployment tools have changed in the past 20 years
geshan
2
35k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
270
The Curse of the Amulet
leimatthew05
3
16k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
440
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
850
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
The Invisible Side of Design
smashingmag
301
52k
Git: the NoSQL Database
bkeepers
PRO
433
67k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
520
Transcript
Containerizing Tests with Docker Compose Stefan Teixeira @stefan_teixeira
[email protected]
stefanteixeira.com.br
stefanteixeira.com
• QA Automation Engineer @ Toptal • Technical blogs: stefanteixeira.com.br
(pt-br) / stefanteixeira.com (en) • Co-organizer of DevOps Carioca and Grupo de Testes Carioca meetups Links: • E-mail:
[email protected]
• Twitter: twitter.com/stefan_teixeira • LinkedIn: linkedin.com/in/stefanteixeira • GitHub: github.com/stefanteixeira • SlideShare: slideshare.net/stefanteixeira About
Docker Compose
Docker Compose • Tool for defining and running multi-container applications
https://docs.docker.com/compose/
Docker Compose • Tool for defining and running multi- container
applications • Previously known as Fig https://docs.docker.com/compose/
Docker Compose • Tool for defining and running multi- container
applications • Previously known as Fig • YAML ❤ https://docs.docker.com/compose/
Compose File (v1)
Compose File (v2)
Containerizing Tests with Docker Compose
WAT?
Containers != mini-VMs https://twitter.com/rhein_wein/status/662995114235678720
Motivation
#1 If tests (except unit tests) are hard to run
locally, developers will not run them. ¯\_(ϑ)_/¯
#2 Sometimes it’s really hard to configure a test environment.
“Docker delivers a predictable, reproducible testing environment.” (Laura Frank, Codeship)
❤
Examples
App A
App A DB
App A DB Mock Service
App A DB Mock Service API Tests
App A DB Mock Service API Tests UI Tests
App A DB Mock Service API Tests UI Tests Security
Tests
App A DB Mock Service API Tests UI Tests Security
Tests Smoke Tests
Demo
Demo • Very simple example, with three containers: • App
(a REST API) • DB (MongoDB database) • API Tests (written with Supertest) • https://github.com/stefanteixeira/demo-testing- compose
Points of attention • Logs
Points of attention • Logs • volumes or data containers
Points of attention • Logs • volumes or data containers
• Startup time
Points of attention • Logs • volumes or data containers
• Startup time • netcat (nc), curl, wait-for-it, wait_for module (Ansible)
Points of attention • Logs • volumes or data containers
• Startup time • netcat (nc), curl, wait-for-it, wait_for module (Ansible) • Generating images
Points of attention • Logs • volumes or data containers
• Startup time • netcat (nc), curl, wait-for-it, wait_for module (Ansible) • Generating images • Alpine-linux, Phusion (minimal base images)
Points of attention • Logs • volumes or data containers
• Startup time • netcat (nc), curl, wait-for-it, wait_for module (Ansible) • Generating images • Alpine-linux, Phusion (minimal base images) • Automate the process
References • "Stop Being Lazy and Test Your Software”: •
https://www.youtube.com/watch?v=Mx1Il9wIepw • http://www.slideshare.net/rheinwein/stop-being-lazy-and-test- your-software • https://hharnisc.github.io/2016/06/19/integration-testing-with-docker- compose.html • https://docs.docker.com/compose/startup-order/ • https://github.com/vishnubob/wait-for-it • https://www.ansible.com/blog/six-ways-ansible-makes-docker- compose-better
Thanks! Stefan Teixeira @stefan_teixeira
[email protected]
stefanteixeira.com.br stefanteixeira.com