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
Scrum Gathering Portugal 2016 - Containerizing ...
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Stefan Teixeira
December 01, 2016
Programming
83
0
Share
Scrum Gathering Portugal 2016 - Containerizing Tests with Docker
Talk presented at Scrum Gathering Portugal 2016, in 2016/12/01
Stefan Teixeira
December 01, 2016
More Decks by Stefan Teixeira
See All by Stefan Teixeira
Agile Brazil 2016 - 5 fundamentos essenciais de padrões xUnit
stefanteixeira
0
110
Latinoware 2016 - Continuous Delivery com ferramentas open source
stefanteixeira
0
69
Ágiles 2016 - Using open source tools to support Continuous Delivery
stefanteixeira
0
57
6º Encontro do Grupo de Testes Carioca - Testes em um contexto de Continuous Delivery
stefanteixeira
0
48
TDC 2016 SP - Desmistificando cobertura de código como métrica de qualidade
stefanteixeira
0
130
TDC 2016 SP - Continuous Delivery para aplicações Java com ferramentas open-source
stefanteixeira
0
86
TDC 2016 SP - Cobertura de código de procedures T-SQL com SQLCC
stefanteixeira
0
76
TDC 2016 SP - 5 libs de teste JavaScript que você deveria conhecer
stefanteixeira
0
63
Scrum Gathering Rio 2016 - Conteinerizando Testes com Docker Compose
stefanteixeira
0
70
Other Decks in Programming
See All in Programming
Tamach-sre-3_ANDPAD-shimaison93
mane12yurks38
0
220
モックわからないマン卒業記 ~振る舞いを起点に見直した、フロントエンドテストにおけるモックの使いどころ~
tasukuwatanabe
3
440
AI時代のシステム設計:ドメインモデルで変更しやすさを守る設計戦略
masuda220
PRO
6
1.1k
今からFlash開発できるわけないじゃん、ムリムリ! (※ムリじゃなかった!?)
arkw
0
170
OTP を自動で入力する裏技
megabitsenmzq
0
130
20260315 AWSなんもわからん🥲
chiilog
2
180
How to stabilize UI tests using XCTest
akkeylab
0
150
20260320登壇資料
pharct
0
140
仕様漏れ実装漏れをなくすトレーサビリティAI基盤のご紹介
orgachem
PRO
8
3.8k
野球解説AI Agentを開発してみた - 2026/02/27 LayerX社内LT会資料
shinyorke
PRO
0
380
年間50登壇、単著出版、雑誌寄稿、Podcast出演、YouTube、CM、カンファレンス主催……全部やってみたので面白さ等を比較してみよう / I’ve tried them all, so let’s compare how interesting they are.
nrslib
4
590
PHP 7.4でもOpenTelemetryゼロコード計装がしたい! / PHPerKaigi 2026
arthur1
1
460
Featured
See All Featured
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Exploring anti-patterns in Rails
aemeredith
2
300
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
140
The Language of Interfaces
destraynor
162
26k
The Spectacular Lies of Maps
axbom
PRO
1
670
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
620
Marketing to machines
jonoalderson
1
5.1k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
10k
A better future with KSS
kneath
240
18k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
160
[SF Ruby Conf 2025] Rails X
palkan
2
880
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.4k
Transcript
Containerizing Tests with Docker Stefan Teixeira @stefan_teixeira
[email protected]
• QA Automation Engineer @ Toptal • Blogs: stefanteixeira.com.br (pt-br)
/ stefanteixeira.com (en) Contact: • E-mail:
[email protected]
• Twitter: twitter.com/stefan_teixeira • LinkedIn: linkedin.com/in/stefanteixeira • GitHub: github.com/stefanteixeira • SlideShare: slideshare.net/stefanteixeira About me
None
VMs x Containers https://www.docker.com/whatisdocker
Why?
Why? • Reprodutibility
Why? • Reprodutibility
Why? • Scalability
Why? • Scalability
Why? • Containers are (really) fast
Why? • Containers are (really) fast
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
Containerizing Tests with Docker
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
https://hub.docker.com/u/selenium/
Demo
Demo • Very simple example, with three containers: • App
(a REST API written in Node.js) • 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 • wait-for-it, netcat (nc), curl, wait_for module (Ansible)
Points of attention • Building images
Points of attention • Building images • minimal base images:
Alpine-linux, Phusion
Points of attention • Building images • minimal base images:
Alpine-linux, Phusion • 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
Stefan Teixeira @stefan_teixeira
[email protected]
Thanks!