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
88
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
73
Ágiles 2016 - Using open source tools to support Continuous Delivery
stefanteixeira
0
63
6º Encontro do Grupo de Testes Carioca - Testes em um contexto de Continuous Delivery
stefanteixeira
0
51
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
90
TDC 2016 SP - Cobertura de código de procedures T-SQL com SQLCC
stefanteixeira
0
81
TDC 2016 SP - 5 libs de teste JavaScript que você deveria conhecer
stefanteixeira
0
66
Scrum Gathering Rio 2016 - Conteinerizando Testes com Docker Compose
stefanteixeira
0
75
Other Decks in Programming
See All in Programming
フロントエンドとバックエンドで「1文字」を揃えよう
youkidearitai
PRO
0
750
「AIで開発し、AIを届ける」をEvalでつなぐ 〜AIネイティブに始めるプロダクト開発の実践〜 / Connecting "Develop with AI, deliver AI" with Eval
rkaga
4
5.4k
Hunting Vulnerabilities in Symfony with LLMs
vinceamstoutz
0
560
AI時代のUIはどこへ行く?その2!
yusukebe
22
7.5k
Javaの型とAI時代に型が大事な理由 / java types and type in AI era
kishida
2
150
エンジニアと一緒にテストコードの設計と実装を改善した話
mototakatsu
0
230
IBM Bobを活用したレガシーアプリの最新化
oniak3ibm
PRO
1
220
Vue × Nuxt × Oxc どこまで使える?実運用の現在地
andpad
0
310
Even G2とAWSで推しのエージェントを召喚しよう!
har1101
1
130
Vite+ Unified Toolchain for the Web
naokihaba
0
360
ローカルLLMを使ってB2Bサービスを作っていての学び
yaotti
0
220
過去最大のMCPアップデート! 2026-07-28 RC版の謎に迫る
licux
6
400
Featured
See All Featured
Unsuck your backbone
ammeep
672
58k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
GraphQLとの向き合い方2022年版
quramy
50
15k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.2k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
950
Leo the Paperboy
mayatellez
7
1.9k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
210
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
380
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.2k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
240
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
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!