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 Rio 2016 - Containerizing Tests...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Stefan Teixeira
June 24, 2016
Programming
66
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
88
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
Other Decks in Programming
See All in Programming
ローカルLLMを使ってB2Bサービスを作っていての学び
yaotti
0
220
Signal Forms: Details & Live Coding @enterJS 2026 in Mannheim
manfredsteyer
PRO
0
200
そのテスト、説明できますか?~LWテスト戦略FW~のご紹介
nakahara
0
170
dRuby over BLE
makicamel
2
390
鹿野さんに聞く!『TypeScriptコードレシピ集』で磨く実践力
tonkotsuboy_com
4
850
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
610
SREは、MCPとSRE Agentをこう使え!
kazumax55
0
120
ローカルLLMでどこまでコードが書けるか -拡張版 / How much code can be written on a local LLM Extended
kishida
12
4.4k
Spring Security 実践 ─ GraphQL APIで実務に役立つ 認証・認可 を学ぶ
wagyu
0
260
Make SRE Operations Easier with Azure SRE Agent
kkamegawa
0
8.4k
トークンをケチるな、設計しろ:GitHub Copilotを賢く使うコンテキスト戦略
ochtum
0
210
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
2.3k
Featured
See All Featured
Evolving SEO for Evolving Search Engines
ryanjones
0
230
Skip the Path - Find Your Career Trail
mkilby
1
150
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
450
The #1 spot is gone: here's how to win anyway
tamaranovitovic
3
1.1k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.8k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
540
Code Review Best Practice
trishagee
74
20k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1k
Marketing to machines
jonoalderson
1
5.5k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Automating Front-end Workflow
addyosmani
1370
210k
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