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
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
270
エンジニア向け会社紹介/Findy Company Profile
findyinc
6
350k
LLM本来の能力を解き放つサンドボックス技術とAI民主化への適用
yukukotani
3
4.6k
Spring Security 実践 ─ GraphQL APIで実務に役立つ 認証・認可 を学ぶ
wagyu
0
260
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
8
3.3k
Strategic Design in the Frontend: Moduliths & Micro Frontends @DDDEurope
manfredsteyer
PRO
0
130
Skillsは効率化、Agentsは"自分の拡張"——Builder時代のエージェント編成(CC Night 2026)
wemra
1
170
Oxcを導入して開発体験が向上した話
yug1224
4
340
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
3
790
Observability in Practice:Grafana 與 Edge Device SRE 的那些事
blueswen
0
180
Even G2とAWSで推しのエージェントを召喚しよう!
har1101
1
130
さぁV100、メモリをお食べ・・・
nilpe
0
160
Featured
See All Featured
A Soul's Torment
seathinner
6
3k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
So, you think you're a good person
axbom
PRO
2
2.1k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
450
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.2k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
340
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
200
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
450
How STYLIGHT went responsive
nonsquared
100
6.2k
Odyssey Design
rkendrick25
PRO
2
710
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
250
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!