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
Stefan Teixeira
December 01, 2016
Programming
86
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
120
Latinoware 2016 - Continuous Delivery com ferramentas open source
stefanteixeira
0
70
Ágiles 2016 - Using open source tools to support Continuous Delivery
stefanteixeira
0
59
6º Encontro do Grupo de Testes Carioca - Testes em um contexto de Continuous Delivery
stefanteixeira
0
50
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
88
TDC 2016 SP - Cobertura de código de procedures T-SQL com SQLCC
stefanteixeira
0
79
TDC 2016 SP - 5 libs de teste JavaScript que você deveria conhecer
stefanteixeira
0
64
Scrum Gathering Rio 2016 - Conteinerizando Testes com Docker Compose
stefanteixeira
0
74
Other Decks in Programming
See All in Programming
ふつうのFeature Flag実践入門
irof
7
3.4k
Stage 3 Decorators でできること / できないこと / TSKaigi 2026
susisu
1
1.5k
軽量Java基盤の設計 DIコンテナに頼らない、長期保守と1秒起動の実現 JJUG CCC 2026 Spring
macha64
0
350
正しくソフトウェアを作る、前提を疑うための認知の視点 / doubt-premise
minodriven
13
4.5k
JavaDoc 再入門
nagise
0
240
LLM本来の能力を解き放つサンドボックス技術とAI民主化への適用
yukukotani
2
1.1k
TSKaigi2026-静的解析への投資がAI時代のコード品質を支える ── カスタムESLintルールの設計と運用
hayatokudou
7
1.3k
密結合なバックエンドから TypeScript のコードを生成する
kemuridama
1
620
RailsTokyo 2026#4: AI様があれば、 Hotwireの弱点は消えるか?
naofumi
5
1k
[KCD Czech] eBPF Meets the GPU: Future of AI Infra Observability
doniacld
0
130
OSもどきOS
arkw
0
380
CLIであることを活かしたGitHub Copilot CLI活用術 / GitHub Copilot CLI Pro Tips & Tricks
nao_mk2
1
1.2k
Featured
See All Featured
New Earth Scene 8
popppiees
3
2.3k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Amusing Abliteration
ianozsvald
1
190
Why Our Code Smells
bkeepers
PRO
340
58k
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
140
The Pragmatic Product Professional
lauravandoore
37
7.3k
Into the Great Unknown - MozCon
thekraken
41
2.5k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
440
The browser strikes back
jonoalderson
0
1.1k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
260
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
160
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!