āContainerizingā applications with Docker: Ecosystem and Tools
Scrum Gathering Portugal 2016 - Containerizing Tests with Docker
-
Upload
stefan-teixeira -
Category
Software
-
view
233 -
download
0
Transcript of Scrum Gathering Portugal 2016 - Containerizing Tests with Docker
Containerizing Tests with Docker š³š
Stefan Teixeira @stefan_teixeira
ā¢ 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
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/
Containers != mini-VMs
https://twitter.com/rhein_wein/status/662995114235678720
#1
If tests (except unit tests) are hard to run locally, developers will not run them.
ĀÆ\_(ć)_/ĀÆ
āDocker delivers a predictable, reproducible testing environment."
š³ā¤
(Laura Frank, Codeship)
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 ā¢ volumes or data containers
ā¢ Startup time ā¢ wait-for-it, netcat (nc), curl, wait_for module
(Ansible)
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
Thanks!