EuroPython 2018

Writing and Running Tests in Docker

Speaker(s) Alexandre Figura

“How to Launch your Tests with Docker Compose: Best Practices and Traps to Avoid": that would make a great title for a book! Unfortunately, there is no such book available currently. In the meantime, we are all struggling on how to make our applications running in Docker… Because there is so many ways to do it, it’s often hard to find out what is the best way to do it.

But with some practice, and many trials/errors, some patterns take shape. That’s what we will see during this training session. We will start by writing some tests for a web application with Pytest. Then, we will automate them with Tox. And to finish, we will run them in Docker Compose. Our development workflow will be managed with Invoke, and our goal will be to have tests independent of the running environment, so they can be run both locally or on a continuous integration server (e.g., GitLab with Kubernetes runners).

Requirements:

  • Python 3.6
  • Tox (+ Pip + Virtualenv)
  • Docker & Docker Compose
  • Google Chrome
  • Clone demo repository: https://github.com/arugifa/ep2018-workshop

in on Tuesday 24 July at 09:30 See schedule
in on Tuesday 24 July at 11:15 See schedule

Do you have some questions on this talk?

New comment