Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Scrum Gathering Rio 2016 - Containerizing Tests...
Search
Stefan Teixeira
June 24, 2016
Programming
75
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
Transcript
34 slides
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
More Decks by Stefan Teixeira
See All by Stefan Teixeira
Scrum Gathering Portugal 2016 - Containerizing Tests with Docker
stefanteixeira
0
95
Agile Brazil 2016 - 5 fundamentos essenciais de padrões xUnit
stefanteixeira
0
120
Latinoware 2016 - Continuous Delivery com ferramentas open source
stefanteixeira
0
80
Ágiles 2016 - Using open source tools to support Continuous Delivery
stefanteixeira
0
68
6º Encontro do Grupo de Testes Carioca - Testes em um contexto de Continuous Delivery
stefanteixeira
0
54
TDC 2016 SP - Desmistificando cobertura de código como métrica de qualidade
stefanteixeira
0
150
TDC 2016 SP - Continuous Delivery para aplicações Java com ferramentas open-source
stefanteixeira
0
99
TDC 2016 SP - Cobertura de código de procedures T-SQL com SQLCC
stefanteixeira
0
87
TDC 2016 SP - 5 libs de teste JavaScript que você deveria conhecer
stefanteixeira
0
79
Other Decks in Programming
See All in Programming
RaspberryPi 5で軽くはじめるk3sとtailscaleを用いたホームサーバー構築 (1)
nasum
0
360
Zero-Tap Sign-In対応、結局何をすればいいの?
mitohato14
0
2.3k
AIが実装を担う時代の「技術設計」と「チームマネジメント」
kamina_zzz
2
270
Snowflake Openflow Connector利用の勘所 / 20261024developersio2026tokyo-snowflake-openflow
kasacchiful
PRO
0
350
AI-Powered Domain-Driven Design
ziobrando
0
460
ビジネスロジックを堅牢に~Scala 3のドメインプリミティブ~
j5ik2o
0
200
仕様駆動開発入門 (何を作るかを先に決めて渡す) | 目指せ Kiro マスター 05
inariku
PRO
2
180
선언형 햅틱 라이브러리 진동을 소개합니다
l2hyunwoo
1
320
AI時代のシニアエンジニアとは
yosuke_furukawa
PRO
15
12k
LLM 101
dalinaum
0
500
React Native経験者が Flutterを30⽇間触って驚いたこと
3saito
0
200
クラウドゲーミングのパフォーマンス最適化に挑む / Cloud Gaming Performance Tuning
vivion
0
350
Featured
See All Featured
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
810
Utilizing Notion as your number one productivity tool
mfonobong
4
640
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
640
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
350
Statistics for Hackers
jakevdp
799
230k
What does AI have to do with Human Rights?
axbom
PRO
1
2.5k
Building Flexible Design Systems
yeseniaperezcruz
330
41k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
550
Balancing Empowerment & Direction
lara
6
1.4k
Google's AI Overviews - The New Search
badams
0
1.7k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
600
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
350