Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Scrum Gathering Rio 2016 - Containerizing Tests with Docker Compose

Scrum Gathering Rio 2016 - Containerizing Tests with Docker Compose

Stefan Teixeira

June 24, 2016
Tweet

More Decks by Stefan Teixeira

Other Decks in Programming

Transcript

  1. • 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
  2. Docker Compose • Tool for defining and running multi- container

    applications • Previously known as Fig https://docs.docker.com/compose/
  3. Docker Compose • Tool for defining and running multi- container

    applications • Previously known as Fig • YAML ❤ https://docs.docker.com/compose/
  4. #1 If tests (except unit tests) are hard to run

    locally, developers will not run them. ¯\_(ϑ)_/¯
  5. 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
  6. Points of attention • Logs • volumes or data containers

    • Startup time • netcat (nc), curl, wait-for-it, wait_for module (Ansible)
  7. Points of attention • Logs • volumes or data containers

    • Startup time • netcat (nc), curl, wait-for-it, wait_for module (Ansible) • Generating images
  8. 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)
  9. 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
  10. 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