More Related Content Similar to Scrum Gathering Portugal 2016 - Containerizing Tests with Docker (20) More from Stefan Teixeira (14) Scrum Gathering Portugal 2016 - Containerizing Tests with Docker2. • QA Automation Engineer @ Toptal
• Blogs: stefanteixeira.com.br (pt-br) /
stefanteixeira.com (en)
Contact:
• E-mail: stefanfk@gmail.com
• Twitter: twitter.com/stefan_teixeira
• LinkedIn: linkedin.com/in/stefanteixeira
• GitHub: github.com/stefanteixeira
• SlideShare: slideshare.net/stefanteixeira
About me
13. Docker Compose
• Tool for defining and running multi-
container applications
https://docs.docker.com/compose/
14. Docker Compose
• Tool for defining and running multi-
container applications
• Previously known as Fig
https://docs.docker.com/compose/
15. Docker Compose
• Tool for defining and running multi-
container applications
• Previously known as Fig
• YAML ❤
https://docs.docker.com/compose/
20. #1
If tests (except unit tests) are hard to run
locally, developers will not run them.
¯_(ツ)_/¯
22. “Docker delivers a predictable,
reproducible testing environment."
🐳❤
(Laura Frank, Codeship)
30. App A
DB Mock Service
API Tests
UI Tests
Security Tests
Smoke Tests
33. 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
37. Points of attention
• Logs
• volumes or data containers
• Startup time
• wait-for-it, netcat (nc), curl, wait_for module
(Ansible)
40. Points of attention
• Building images
• minimal base images: Alpine-linux, Phusion
• automate the process
41. 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