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

Scrum Gathering Portugal 2016 - Containerizing Tests with Docker

Scrum Gathering Portugal 2016 - Containerizing Tests with Docker

Talk presented at Scrum Gathering Portugal 2016, in 2016/12/01

Stefan Teixeira

December 01, 2016
Tweet

More Decks by Stefan Teixeira

Other Decks in Programming

Transcript

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

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

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

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

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

    • Startup time • wait-for-it, netcat (nc), curl, wait_for module (Ansible)
  8. Points of attention • Building images • minimal base images:

    Alpine-linux, Phusion • automate the process
  9. 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